hampel_filter icon indicating copy to clipboard operation
hampel_filter copied to clipboard

Bias when applying Hampel filter

Open oriolcase opened this issue 1 year ago • 0 comments

Hi, I am experiencing an "error" when applying hampel lib filter to data from a dataframe. Output data seems to have a bias in respect the original input data. Last lines of the output df are filled with NaN. I am applying the filter as follows:

df_posthampel['A'] = hampel(df_prehampel['A'], window_size=10, n_sigma=3.0).filtered_data

Here a plot of the input raw data and the filtered: newplot

Do you have news of something similar? Maybe I should modify window sizes, or just synchronize both columns after the filter.

Thank you in advance, Best regards.

oriolcase avatar Dec 15 '23 12:12 oriolcase