hippke / wotan

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

Huber spline has problems with zero-crossing trend #64

Open guyrixon opened 1 year ago

guyrixon commented 1 year ago

The flatten function computes the trend and then divides it into the input flux to get the output flux. That implies that the trend comes back from the estimator centred on a value of 1, but for Huber spline it doesn't; all the Huber-spline trends for my data are coming back centred on 0. This inevitably produces wild excursions in the middle where the trend is close to zero, even when the shape of the trend is reasonable.

hippke commented 1 year ago

Can you check the example which has a huber spline application? In the example it works fine.