summaryrefslogtreecommitdiff
path: root/fitgaussian2D.m
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2012-09-19 23:35:55 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2012-09-19 23:40:53 -0400
commit68fd0602616f8c24e8895e74d9b3d77077492b0e (patch)
tree4d870265120774906af944e9ab18010780b24b2b /fitgaussian2D.m
parent9ee328d6a556862710428f115e75de05f9c3eb9c (diff)
downloadbeam_profiler-68fd0602616f8c24e8895e74d9b3d77077492b0e.tar.gz
beam_profiler-68fd0602616f8c24e8895e74d9b3d77077492b0e.zip
use of more general fit image function
Diffstat (limited to 'fitgaussian2D.m')
-rw-r--r--fitgaussian2D.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/fitgaussian2D.m b/fitgaussian2D.m
index 817cb77..c3a7051 100644
--- a/fitgaussian2D.m
+++ b/fitgaussian2D.m
@@ -78,7 +78,7 @@ initpar = [cx,cy,sx,sy,PeakOD,theta,background];
%this is to avoid errors when doing fits on the image full of zeros
if isnan(sum(sum(Gaussian2D(initpar,X,Y)-m))) < 1
% Here is the actual fit
- fp = lsqnonlin( @(pt) Gaussian2D(pt,X,Y)-m,initpar,LB,UB,options);
+ fp = fit_image(@Gaussian2D, initpar, X, Y, m, LB, UB, options);
else
fp = [0,0,0,0,0,0,0];
end;