function y = least_square_cp(x0,spec,l);
% fits a power-law function to a spectra. Assume uncertainties are the same 
% for all wavelengths.
y=sum((spec-x0(1).*(532./l).^x0(2)).^2);

