summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugeniy Mikhailov <evgmik@gmail.com>2012-12-19 16:28:42 -0500
committerEugeniy Mikhailov <evgmik@gmail.com>2012-12-19 16:28:42 -0500
commit5ffe17e19ac9a95ede0a9129be7943599f2c2c96 (patch)
tree18e3b678d41ca21f0c44c8ada74b6abb3c623be2
parent0ca3e1a4b9212161d1d3fdaa8752e7cf49861413 (diff)
downloadNresonances-5ffe17e19ac9a95ede0a9129be7943599f2c2c96.tar.gz
Nresonances-5ffe17e19ac9a95ede0a9129be7943599f2c2c96.zip
better estimate of the pulse amplitude for fit
-rw-r--r--xmds2/realistic_Rb_and_fields/find_pulse_center.m2
1 files changed, 1 insertions, 1 deletions
diff --git a/xmds2/realistic_Rb_and_fields/find_pulse_center.m b/xmds2/realistic_Rb_and_fields/find_pulse_center.m
index 11b3395..2aef99d 100644
--- a/xmds2/realistic_Rb_and_fields/find_pulse_center.m
+++ b/xmds2/realistic_Rb_and_fields/find_pulse_center.m
@@ -1,7 +1,7 @@
function [pc, pc_err] = find_pulse_center(x,y)
f=fittype(@(A,x0,width, x) A.*exp(-((x-x0)/width).^2) );
-pin=[1e4, 0, .4e-6]; % A, x0, width
+pin=[max(y), 0, .4e-6]; % A, x0, width
[fitobject,gof] = fit (x, y, f, 'StartPoint', pin);
ci = confint(fitobject);