diff options
author | tlatorre <tlatorre@uchicago.edu> | 2019-09-09 13:24:31 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2019-09-09 13:24:31 -0500 |
commit | 998fef22d1c281a0c604dc03cea6eee0bb070824 (patch) | |
tree | 0a531cca50274c8c5ffee5b544dfcf3a7b474d00 /src | |
parent | 4dac9251843a63b0b7eee6fb67f23f313ae72064 (diff) | |
download | sddm-998fef22d1c281a0c604dc03cea6eee0bb070824.tar.gz sddm-998fef22d1c281a0c604dc03cea6eee0bb070824.tar.bz2 sddm-998fef22d1c281a0c604dc03cea6eee0bb070824.zip |
update fit to allow t0 to be negative
Diffstat (limited to 'src')
-rw-r--r-- | src/fit.c | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -5288,7 +5288,7 @@ int fit_event2(event *ev, double *xopt, double *fmin, int *id, size_t n, double /* Guess the position and t0 of the event using the QUAD fitter. */ status = quad(ev,pos,&t0,10000); - if (status || t0 < 0 || t0 > GTVALID || NORM(pos) > PSUP_RADIUS) { + if (status || t0 > GTVALID || NORM(pos) > PSUP_RADIUS) { /* If the QUAD fitter fails or returns something outside the PSUP or * with an invalid time we just assume it's at the center. */ fprintf(stderr, "quad returned pos = %.2f, %.2f, %.2f t0 = %.2f. Assuming vertex is at the center!\n", @@ -5318,7 +5318,7 @@ int fit_event2(event *ev, double *xopt, double *fmin, int *id, size_t n, double lb[0] = -1000.0; lb[1] = -1000.0; lb[2] = -1000.0; - lb[3] = 0.0; + lb[3] = -100.0; /* Set the upper bound for the parameters which don't change during the * fast minimization. */ @@ -5455,7 +5455,7 @@ int fit_event2(event *ev, double *xopt, double *fmin, int *id, size_t n, double lb[0] = -1000.0; lb[1] = -1000.0; lb[2] = -1000.0; - lb[3] = 0.0; + lb[3] = -100.0; ub[0] = +1000.0; ub[1] = +1000.0; |