mzechmeister / GLS

Generalised Lomb-Scargle periodogram

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

gls.py: AttributeError: Gls instance has no attribute 'df'

mzechmeister opened this issue · comments

If data are passed as arrays, the periodogram cannot be stored in a file:

>>> import numpy as np
>>> from gls import Gls
>>> time = np.random.uniform(54000., 56000., 1000)
>>> flux = 0.15 * np.sin(2. * np.pi * time / 10.)
>>> 
>>> gls = Gls((time, flux))
>>> gls.toFile('test.dat')
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "gls.py", line 762, in toFile
    f.write("#    Data file: %s\n" % self.df)
AttributeError: Gls instance has no attribute 'df'