Skip to content
/ Py-PDM Public

A Python wrapper of the Phase Dispersion Minimization (PDM), which is a C code written by Stellingwerf.

License

Notifications You must be signed in to change notification settings

ckm3/Py-PDM

Repository files navigation

Py-PDM

image Documentation Status CI GitHub

A Python wrapper of the Phase Dispersion Minimization (PDM), which is a C code written by Stellingwerf.

Compared with other Python implementations, with the help of Cython, we can obtain a much faster PDM tool.

Example result

The red lines show the true frequency and its n times period.

Performance

Compared to the Pure Python implementation of PDM of PyAstronomy:

Comparison result

Installation

Before installing, make sure you have already installed the cython and numpy in your Python3 environment.

To install Py-PDM with pip:

pip install py-pdm

Alternatively you can install it manually:

git clone https://github.com/ckm3/Py-PDM.git
cd Py-PDM
python setup.py install

Usage

from pdmpy import pdm

freq, theta = pdm(time, y_value, y_sigma, frequency_min, frequency_max, frequency_step, number_of_bins)

Please refer to the documentation to see in details.

Citing

If you find Py-PDM useful in your research, please cite the orginal paper Stellingwerf, Astrophysical Journal, v224, p953, 1978 and add a footnote of this Github repository.

About

A Python wrapper of the Phase Dispersion Minimization (PDM), which is a C code written by Stellingwerf.

Topics

Resources

License

Stars

Watchers

Forks