Hi. I am trying to improve on a gaussian fit to a linescan through the image below.(i.e the green line). Whilst the Gaussian fit isn't too bad, I want to be able to account for the "wings" in the outer parts of the data. This is actually an airy disk.
I thought I could just include another two gaussians in my fitting function to account for these. This is my code:
where a,b,c,d are my single gaussian fits and the a1,b1,c1,d1 & a2,b2,c2,d2 are the additional gaussian fits for the outer peaks.
a0 = max(ydata(:))-min(ydata(:));
d0 = min(ydata(:));
aw=a0/7; (This is the approx amplitude of the "wing" peaks
and the initial parameters as :
I am getting silly results, there is something not quite right. The fitting works not too bad for a single exponential, but as soon as i add the other 2 gaussians into the fitting, the results are way off. I have attached the raw data.