From aa2699809e9cd6cd48b57a011af278660e30d9ab Mon Sep 17 00:00:00 2001 From: tlatorre Date: Mon, 13 Apr 2020 12:00:30 -0500 Subject: fit for up to 5 peaks This commit updates fit.c to start with 5 peaks for the direction seeds. I chose this number because I did some testing with the test-find-peaks program on the atmospheric MC and it looks like 5 peaks were necessary to capture the majority of the peaks. --- src/fit.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/fit.c') diff --git a/src/fit.c b/src/fit.c index 2fb11b9..6e56f9b 100644 --- a/src/fit.c +++ b/src/fit.c @@ -5490,8 +5490,8 @@ int fit_event2(event *ev, double *xopt, double *fmin, int *id, size_t n, double /* Find the peaks in the Hough transform of the event. */ find_peaks(ev, pos, t0, 100, 100, peak_theta, peak_phi, &npeaks, LEN(peak_theta), 0.1); - /* Don't fit more than 3 peaks for now. */ - if (npeaks > 3) npeaks = 3; + /* Don't fit more than 5 peaks for now. */ + if (npeaks > 5) npeaks = 5; result = malloc(sizeof(size_t)*n*ipow(npeaks,n)); -- cgit