simonsobs / sotodlib

Simons Observatory: Time-Ordered Data processing library.
MIT License
14 stars 17 forks source link

Add Polynomial Filtering Options #140

Open kmharrington opened 3 years ago

kmharrington commented 3 years ago

This overlaps a bit with tod_ops.detrend. But expanding to higher level polynomials would be useful

zhuber21 commented 2 years ago

Is this the sort of thing where we are looking for a polynomial-based low-pass filter like a Savitzky-Golay filter from scipy or just an expansion to tod_ops.detrend that can remove a single polynomial of any order from the data? Am I right to assume we are looking more for the former and want to put it in tod_ops.filters?

kmharrington commented 2 years ago

Actually I think I would put this in the tod_ops.detrend module because the tod_ops.filters module is all Fourier filtering. It could be an extension to the existing detrend function or a new function.

It might be nice if these functions took a RangesMatrix to use to flag data that shouldn't be considered part of the polynomial filtering.