[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-commits
Subject: branches/work/kst/portto4/kst/src/plugins/fits/gaussian_unweighted
From: Barth Netterfield <netterfield () astro ! utoronto ! ca>
Date: 2012-12-23 22:26:11
Message-ID: 20121223222611.E1FFBAC80E () svn ! kde ! org
[Download RAW message or body]
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;
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic