Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Structure Function not end #6

Open
leliel12 opened this issue Sep 13, 2017 · 2 comments
Open

Structure Function not end #6

leliel12 opened this issue Sep 13, 2017 · 2 comments

Comments

@leliel12
Copy link

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

@leliel12
Copy link
Author

My environment

$ pip freeze
cycler==0.10.0
git+https://github.com/isadoranun/FATS.git
functools32==3.2.3.post2
matplotlib==2.0.2
numpy==1.13.1
pandas==0.20.3
patsy==0.4.1
pkg-resources==0.0.0
pyparsing==2.2.0
python-dateutil==2.6.1
pytz==2017.2
scipy==0.19.1
six==1.10.0
statsmodels==0.8.0
subprocess32==3.2.7

@leliel12
Copy link
Author

the output of run the test script

$ python test_StructureFunction_index_21.py
/test_FATS/local/lib/python2.7/site-packages/statsmodels/compat/pandas.py:56: FutureWarning: The pandas.core.datetools module is deprecated and will be removed in a future version. Please use the pandas.tseries module instead.
  from pandas.core import datetools
/test_FATS/local/lib/python2.7/site-packages/FATS/FeatureFunctionLib.py:1404: RuntimeWarning: divide by zero encountered in log10
  sf1_log = np.log10(np.trim_zeros(sf1))
/test_FATS/local/lib/python2.7/site-packages/FATS/FeatureFunctionLib.py:1405: RuntimeWarning: divide by zero encountered in log10
  sf2_log = np.log10(np.trim_zeros(sf2))
/test_FATS/local/lib/python2.7/site-packages/FATS/FeatureFunctionLib.py:1406: RuntimeWarning: divide by zero encountered in log10
  sf3_log = np.log10(np.trim_zeros(sf3))
/test_FATS/local/lib/python2.7/site-packages/numpy/lib/polynomial.py:584: RuntimeWarning: invalid value encountered in true_divide
  lhs /= scale

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant