Method to smoothen a light curve
I found this cool method which is used to smoothen the lightcurves to get rid of short term factors that influence the light curve that comes from the star. source: https://ui.adsabs.harvard.edu/abs/1964AnaCh..36.1627S/abstract
I’ve been exploring a potential solution to smoothen the light curves and reduce short-term fluctuations that may be affecting the signal from the star. As you said one method that I also came across is the Savitzky Golay filter, which is often used in time series analysis for smoothing data without distorting the underlying signal. As made a glance in the paper and found that this technique fits a polynomial to a moving window of data points, which could be effective in filtering out noise in light curves while preserving important trends. Some approach :
- Window size: We can adjust the window size to balance between noise reduction and retaining features of the signal.
- Polynomial order: Typically, a second-order polynomial is used, but this could be customized based on the specific nature of the light curve. If there is an interest in integrating this approach into the Stingray framework, I’d be happy to contribute a function or implementation that incorporates the Savitzky Golay filter for light curve smoothing. Please let me know your thoughts, and I’d be happy to discuss further or assist in any way! Thank you for considering this approach.
Hi @jsdingra11 ,I don't think using Savitzky-Golay (which relies on the least squares method) is ideal for light curves since it assumes the errors are Gaussian-distributed. However, light curve data—especially from photon-counting instruments—follow a Poisson distribution.
source
-
https://github.com/StingraySoftware/stingray/pull/906#:~:text=The%20methods%20you,one%20in%20mind%3F
However, in my pr #906 I use poission regressor with spline basis