diff --git a/src/toast/ops/azimuth_intervals.py b/src/toast/ops/azimuth_intervals.py index e929db16c..6323c8998 100644 --- a/src/toast/ops/azimuth_intervals.py +++ b/src/toast/ops/azimuth_intervals.py @@ -519,9 +519,9 @@ def _exec(self, data, detectors=None, **kwargs): flag_intervals.apply(data, detectors=None) def _find_turnaround(self, vel): - """Fit a quadratic polynomial and find the turnaround sample.""" + """Fit a polynomial and find the turnaround sample.""" x = np.arange(len(vel)) - fit_poly = np.polynomial.polynomial.Polynomial.fit(x, vel, 4) + fit_poly = np.polynomial.polynomial.Polynomial.fit(x, vel, 5) fit_vel = fit_poly(x) vel_switch = np.where(fit_vel[:-1] * fit_vel[1:] < 0)[0] if len(vel_switch) != 1: