[Kst] branches/work/kst/portto4/kst/src/plugins/fits/gaussian_unweighted
Barth Netterfield
netterfield at astro.utoronto.ca
Sun Dec 23 22:26:11 UTC 2012
SVN commit 1329654 by netterfield:
Fix the fix to gaussian fits so they actually fit.
M +2 -3 fitgaussian_unweighted.cpp
--- branches/work/kst/portto4/kst/src/plugins/fits/gaussian_unweighted/fitgaussian_unweighted.cpp #1329653:1329654
@@ -169,7 +169,7 @@
double x_at_min_y;
double x_at_max_y;
- double A, B, C, D;
+ double A, C, D;
// find peak, vally, and mean
for (int i = 0; i<npts; i++) {
@@ -208,10 +208,9 @@
C = x_at_min_y;
}
// guess that the width of the gaussian is around 1/4 of the x range (?)
- B = (max_x - min_x)*0.25;
P[0] = A;
- P[1] = 1.0/(sqrt(2.0*B));
+ P[1] = (max_x - min_x)*0.1;
P[2] = C;
P[3] = D;
More information about the Kst
mailing list