Skip to content

Commit

Permalink
Tweak polynomial order in turnaround finding
Browse files Browse the repository at this point in the history
  • Loading branch information
tskisner committed Nov 14, 2024
1 parent e075c21 commit da63a6b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/toast/ops/azimuth_intervals.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit da63a6b

Please sign in to comment.