Code Monkey home page Code Monkey logo

fats's People

Contributors

danielk605 avatar isadoranun avatar jorgemarpa avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

fats's Issues

SlottedA_length fails

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

Structure Function not end

I found a big bug on the master code of FATS. with some light curves the StructureFunction_index_21 never ends. I attached a test case with the examples of a lightcurve from a VVV that make the feature fail. And also a screenshoot of my process monitor when i run the script

I suspect the error is a bad use of the numpy.trim_zero function. This functions only remove the leading and trailing zeros but with this light curve are some zeros in between

Test Case: https://gist.github.com/leliel12/a3ee1c0de5a7f2cf72100c99c220f05c

image

Slice indices are not integers

Hello,

I found bugs in some classes for feature extractions. The issue is with slice indices which should be integers (but the are floats). For example this error:

/usr/local/lib/python2.7/dist-packages/FATS/FeatureFunctionLib.pyc in fit(self, data)
27 sorted_mag = np.sort(magnitude)
28
---> 29 return (np.median(sorted_mag[-math.ceil(0.05 * N):]) -
30 np.median(sorted_mag[0:math.ceil(0.05 * N)])) / 2.0
31 # return sorted_mag[10]

TypeError: slice indices must be integers or None or have an index method

Method math.ceil returns floats. So it would be sufficient to wrap it by int().

Another example in the file lomb.py line 150:
wk1 = wk1[1:nout+1]
wk2 = wk2[1:nout+1]

since variable "nout" is float it should look like this:
wk1 = wk1[1:int(nout)+1]
wk2 = wk2[1:int(nout)+1]

This version works for me.

I would like to use this library in my package, so I would be grateful to have these little bugs fixed.

Thank you.

Key Error : 0L while using preproccesed_data.Preprocess() | python 2.7

I have a light curve data in csv , using which I am trying to extract the features using FATS. Following the documentation, I have tried to preprocess the data using preprocessed_data.preprocess() function. However, I get the following error. I am not sure if this due to backward compatibility issues or something related to my data. can you please help.
Issue:
image

My data:
image

Thanks,
Kiran Varma

broken unittest test_Stetson

FATS/test_library.py:286: a=a.calculateFeature(white_noise)

looks like the StetsonJ fit() function requires data[7] contain aligned error but the white_noise function doesn't generate it

von Neumann variability index

Hello Isadora,

I have come across your FATs paper (in a very different field!) while developing metrics for a Fisher's Information time-series on ecological data. I'm looking at the Variability index n^e (pictured) and the python code provided.

image

I have a question about one line in the code that is the final calculation:
https://github.com/isadoranun/FATS/blob/master/FATS/FeatureFunctionLib.py#L734

In the code the denominator has a term N ** 2 which I don't see in the pictured equation. I'm recoding the equation in R and am wondering where the N ** 2 term comes from?

If you are wondering how someone in ecology ended up in the astrophysics literature, I'm trying to condense information that looks like this (shortened model data sample):

image

into a suite of single metrics as there will be a thousand model runs to compare.

Thanks very much!
Quinn

compatibility with python 3

I cannot import FATS on python3.4 produces syntax error

import FATS
Traceback (most recent call last):
File "", line 1, in
File "/home/linn/.local/lib/python3.4/site-packages/FATS/init.py", line 2, in
from .Feature import FeatureSpace
File "/home/linn/.local/lib/python3.4/site-packages/FATS/Feature.py", line 93
print "Warning: the feature", name, "could not be calculated because", obj().Data, "are needed."
^
SyntaxError: invalid syntax

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.