summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2012-09-19 22:48:57 -0400
committerEugeniy Mikhailov <evgmik@gmail.com>2012-09-19 22:48:57 -0400
commit0f6c67e982e06b9e8125ee082c9d86dce35ff183 (patch)
tree019ae524d73635462c62b00c1c4c8648453df991
parent6b517b574ddec6051bc5c5b162e8370bd25ce481 (diff)
downloadbeam_profiler-0f6c67e982e06b9e8125ee082c9d86dce35ff183.tar.gz
beam_profiler-0f6c67e982e06b9e8125ee082c9d86dce35ff183.zip
fitgaussian2D.m uses Gaussian2D.m in its calculations
-rw-r--r--fitgaussian2D.m13
1 files changed, 1 insertions, 12 deletions
diff --git a/fitgaussian2D.m b/fitgaussian2D.m
index 02c9fa2..7cf52b9 100644
--- a/fitgaussian2D.m
+++ b/fitgaussian2D.m
@@ -87,15 +87,4 @@ end;
% 2D Gauss function
function [z] = Gaussian2Dff(p,X,Y,m);
-
-cx = p(1);
-cy = p(2);
-wx = p(3);
-wy = p(4);
-amp = p(5);
-theta = p(6);
-background=p(7);
-Xn = (X-cx)*cos(theta) - (Y-cy)*sin(theta);
-Yn = (X-cx)*sin(theta) + (Y-cy)*cos(theta);
-
-z = amp*(exp(-2*((Xn).^2./(wx^2)+(Yn).^2./(wy^2)))) + background - m; \ No newline at end of file
+z = Gaussian2D(p,X,Y) - m;