From 998fef22d1c281a0c604dc03cea6eee0bb070824 Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 9 Sep 2019 13:24:31 -0500 Subject: update fit to allow t0 to be negative --- src/fit.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/fit.c b/src/fit.c index 46a14df..056f6b0 100644 --- a/src/fit.c +++ b/src/fit.c @@ -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; -- cgit