Skip to content

maksatsat/efsearch

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Dec 1, 2022
5f5a6ac · Dec 1, 2022

History

27 Commits
Jun 25, 2022
Jun 25, 2022
Jun 25, 2022
Jun 25, 2022
Jun 23, 2022
Dec 1, 2022
Jun 25, 2022
Jun 25, 2022

Repository files navigation

Epoch Folding

♪ My period don't jiggle jiggle, it folds... ♪

codeastro Read the Docs

A python script to find the time period of a given time series data

Algorithm

Photon arrival times t k (total number of photons N ) are divided into n phase bins of assumed period P . If there is no periodicity in data we expect to see uniform distribution of events among the bins. But if there is a periodicity we will see pulse profile.

To compare the χ 2 - statistics is calculated.

χ 2 = i = 1 n ( O i E i ) 2 E i ,

where O i is observed number of photons in i -th bin, E i = N / n is expected from uniform distribution number of photons.

If χ 2 is big we expect to see periodicity in data.

Below you can see an example of folding with correct and wrong period.

alt text

Installation

pip install git+https://github.com/maksatsat/efsearch.git

Example

from efsearch.ef_search import search, periodic_generator

Generating periodic data with period=30:

times = periodic_generator(period= 42, obs_length = 1000, mean_countrate = 50, pulsed_fraction = 1.0)

Calculating chi2 statistics for periods from 10 to 50 seconds and plotting the results:

periods, chi2 = search(times, 30, 70)
with plt.xkcd():
   plt.plot(periods, chi2)

alt text

References:

Leahy et al. 1989 (On searches for pulsed emission with application to four globular cluster X-ray sources : NGC 1851, 6441, 6624 and 6712)

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages