This is my implementation of the autocorrelation-based period detection algorithm described in McQuillan et al. 2013 and McQuillan et al. 2014. Autocorrelation functions (ACFs) have been shown to be well-suited for detecting rotational periods in stellar light curves.
See example.ipynb
for a walkthrough of how it's used. The algorithm is in acf_mma.py
, with some supporting methods in timeseriestools.py
.
ACFs assume evenly spaced data. This can be obtained by applying map_and_interpolate_gaps
in timeseriestools.py
, which remaps the data to make the cadence constant, linearly interpolating temporal gaps (e.g. t=802 to t=809 in the plot below).
Aftering computing the ACF, the algorithm first determines the dominant period, defined as whichever of the first two ACF peaks has a larger local peak height (defined as the average distance from peak to adjacent troughs). In the example above, the second peak at ~18 days was chosen. Then, the algorithm looks for harmonics of this dominant period, i.e. peaks near integer multiples of the dominant period (orange shaded regions). Finally, the rotation period and its uncertainty are computed by fitting a line to the period of each peak vs. its harmonic number.
- numpy
- scipy
- numba