get_period() fails when used with too much data, because the likelihood overflows. Using log-likelihood would solve that problem, but that isn't an option provided by get_period() at present.
Simple code to reproduce the problem, which works with Npoints = 100 but fails with Npoints = 1000:
import PIPS
import numpy as np
Npoints = 100
noise = 0.1
time = np.sort(np.random.random(Npoints) 10) + 58000
mag = np.sin(time2np.pi) + 15 + np.random.normal(0, noise, size=Npoints)
mag_err = np.ones(Npoints) noise
data = [time, mag, mag_err]
star = PIPS.photdata(data)
period, period_err, Z = star.get_period(multiprocessing=False, Nterms=2, return_Z=True, debug=True)
Thanks for reporting the issue. We had implemented log-likelihood method for the periodogram module but not to photdata.get_period() as you pointed out. Now it's fixed, and your MWE works with Npoints=10000.
get_period() fails when used with too much data, because the likelihood overflows. Using log-likelihood would solve that problem, but that isn't an option provided by get_period() at present.
Simple code to reproduce the problem, which works with Npoints = 100 but fails with Npoints = 1000:
import PIPS import numpy as np Npoints = 100 noise = 0.1 time = np.sort(np.random.random(Npoints) 10) + 58000 mag = np.sin(time2np.pi) + 15 + np.random.normal(0, noise, size=Npoints) mag_err = np.ones(Npoints) noise data = [time, mag, mag_err] star = PIPS.photdata(data) period, period_err, Z = star.get_period(multiprocessing=False, Nterms=2, return_Z=True, debug=True)