isadoranun / FATS

MIT License
75 stars 40 forks source link

SlottedA_length fails #2

Closed leliel12 closed 7 years ago

leliel12 commented 7 years ago

I attach the numpy array with the data to reproduce the error

The Data

ftest.npy.zip (unzip first)

Input

lc = np.load("ftest.npy")
import FATS
a = FATS.FeatureSpace(featureList=['SlottedA_length'] , SlottedA_length = 1)
a=a.calculateFeature(lc)
print a.result(method='dict')

a = FATS.FeatureSpace(featureList=['SlottedA_length'])
a=a.calculateFeature(lc)
print a.result(method='dict'), "<<< fail an empty list"

The output

{'SlottedA_length': 7}
{'SlottedA_length': array([], shape=(1, 0), dtype=float64)} <<< fail
zhuming2003star commented 7 years ago

I think the time on your data is not sorted. My understanding is you need to have the time series ready for the package, such as:

mag_uniform=np.random.uniform(size=10000)
time_uniform=np.arange(10000)
lc_uniform = np.array([mag_uniform, time_uniform])
leliel12 commented 7 years ago

thanks