diff options
author | tlatorre <tlatorre@uchicago.edu> | 2019-03-26 17:16:38 -0500 |
---|---|---|
committer | tlatorre <tlatorre@uchicago.edu> | 2019-03-26 17:16:38 -0500 |
commit | 4594d92c3437fe65e3bf5cd50fcc87150d03a918 (patch) | |
tree | d599ab4259f447182be4225e9acf66ad8df9991d | |
parent | def9e9168dc3f3e3c70ff4bf61d176ed28ca6184 (diff) | |
download | sddm-4594d92c3437fe65e3bf5cd50fcc87150d03a918.tar.gz sddm-4594d92c3437fe65e3bf5cd50fcc87150d03a918.tar.bz2 sddm-4594d92c3437fe65e3bf5cd50fcc87150d03a918.zip |
small fix to fit.c
-rw-r--r-- | src/fit.c | 8 |
1 files changed, 3 insertions, 5 deletions
@@ -5268,7 +5268,7 @@ int fit_event2(event *ev, double *xopt, double *fmin, int *id, size_t n, double int status; /* Create the minimizer object. */ - opt = nlopt_create(NLOPT_LN_SBPLX, 4+3*n); + opt = nlopt_create(NLOPT_LN_BOBYQA, 4+3*n); nlopt_set_min_objective(opt,nlopt_nll2,&fpars); /* Guess the position and t0 of the event using the QUAD fitter. */ @@ -5442,10 +5442,8 @@ int fit_event2(event *ev, double *xopt, double *fmin, int *id, size_t n, double ub[3] = GTVALID; /* Set the energy step size to 2% of the energy. */ - for (i = 0; i < nvertices; i++) { - for (j = 0; j < n; j++) { - ss[4+3*j] = xopt[4+3*j]*0.02; - } + for (j = 0; j < n; j++) { + ss[4+3*j] = xopt[4+3*j]*0.02; } nlopt_set_lower_bounds(opt, lb); |