P4J is a python package for period detection on irregularly sampled and heteroscedastic time series based on Information Theoretic objective functions. P4J was developed for astronomical light curves, irregularly sampled time series of stellar magnitude or flux. The core of this package is a class called periodogram that sweeps an array of periods/frequencies looking for the one that maximizes a given criterion. The main contribution of this work is a criterion for period detection based on the maximization of Cauchy-Schwarz Quadratic Mutual Information (Huijse et al., 2017). Information theoretic criteria incorporate information on the whole probability density function of the process and are more robust than classical second-order statistics based criteria (Principe, 2010). For comparison P4J also incorporates other period detection methods used in astronomy such as the Phase Dispersion Minimization periodogram (Stellingwerf, 1973), Lafler-Kinman's string length (Clarke, 2002) and the Orthogonal multiharmonic AoV periodogram (Schwarzenberg-Czerny, 1996).
Install from PyPI using:
pip install P4J
or clone this github and from its root run:
pip install --editable .
During installation, c
sources are generated using cython
. If you have a UNIX system the GCC compiler is most likely already installed. If you have a Windows system you may want to install the Microsoft Visual C++ (MSVC) compiler. You can find relevant information at: https://wiki.python.org/moin/WindowsCompilers.
Please review
https://github.com/phuijse/P4J/blob/master/examples/periodogram_demo.ipynb
(P4J = Four Pablos and one Jose)
We would like to thank the people of the Computational Intelligence laboratory @ UChile, Center for Mathematical Modeling @ Uchile, the Millennium Institute of Astrophysics (www.astrofisicamas.cl), LSST group @ University of Washington and the participants of the Harvard-Chile Data Science school (www.hcds.cl) for their comments and useful discussions. Pablo Huijse acknowledges financial support from FONDECYT through grant 1170305 and postdoctoral grant 3150460, and from the Chilean Ministry of Economy, Development, and Tourism's Millennium Science Initiative through grant IC12009, awarded to The Millennium Institute of Astrophysics, MAS.