hippke / wotan

Automagically remove trends from time-series data
MIT License
147 stars 21 forks source link

pspline: Value error possibly triggered by gaps smaller than break tolerance #57

Closed rachelbf closed 4 years ago

rachelbf commented 4 years ago

I get these errors for certain lightcurves (e.g.: 357898147, 45059728) that have gaps in them that (I can visually see) are smaller than the break tolerance. The only time that this error goes away is if I set break_tolerance = 0 which leads it to fit the data downlink gaps in the sectors as well. Screen Shot 2020-09-29 at 13 36 06

hippke commented 4 years ago

Can you provide a data file (or code that pulls the data) to reproduce?

rachelbf commented 4 years ago

Attached are two lightcurves (psf; extracted using eleanor) that are caused this error tic340003212.txt tic469811127.txt

hippke commented 4 years ago

Thank you for the bug report and sorry you're having issues with wotan. I made a fix in this file. It now works for your example files. Can you check if more extensively and let me know if it works in all cases? I would then push a new wotan version to pip.

rachelbf commented 4 years ago

I tested it on about 10 light curves with that initially gave me the same error as above. With the fix, I don't get the error anymore. Thanks!

hippke commented 4 years ago

Thanks for testing! Relased via pip and github.