Skip to main content

Module filter

Module filter 

Source
Expand description

Filters a flight log’s channels are cleaned with before a reading is taken from them.

Functions§

hampel
The Hampel filter: each sample more than threshold robust standard deviations from its window’s median replaced by that median, the scale being 1.4826 times the window’s median absolute deviation (R. K. Pearson et al., The Class of Generalized Hampel Filters, EUSIPCO 2015, §2, eqs. 1 and 2, with K = half and t = threshold). Windows are cut short at the ends and skip NaNs, as in running_median, which is this filter at threshold = 0.
running_median
The running median of values: each sample replaced by the median of the samples within half places of it, the window cut short at either end of the record. NaNs are skipped; a window with no finite sample gives NaN. An even count takes the mean of the middle two.