../_images/calypso.png

toto.filters.lanczos_filter

Apply a low pass 1st or 2nd order lanczos filter

Parameters

input_arraypanda obj

The input data.

windowint

window in hour, a good window is 40 h window of hourly data

typestr

Can be lanczos lowpas 1st order, lanczos lowpas 2nd order depending on the order.

Examples:

>>> df['filtered']=lanczos_filter.lanczos_filter(df['signal'].copy(),args={'window':100,'Type':'lanczos lowpas 1st order'})
>>> 
toto.filters.lanczos_filter.lanczos_filter(input_array, args={'type': {'lanczos lowpas 1st order': True, 'lanczos lowpas 2nd order': False}, 'window': 0})[source]
toto.filters.lanczos_filter.lanczos_lowpass_filter_coeffs(cf, m, normalize=True)[source]

return the convolution coefficients for low pass lanczos filter.

Parameters

Cf: float

Cutoff frequency expressed as a ratio of a Nyquist frequency.

M: int

Size of filtering window size.

Returns

Results: list

Coefficients of filtering window.

toto.filters.lanczos_filter.lanczos_lowpass_first_order(data, window, dt=1)[source]
toto.filters.lanczos_filter.lanczos_lowpass_second_order(data, window, dt=1)[source]

Inpulse response filter