To Do in fieldpy.core.helper_fns_cython.filter_and_resample
- Correct above point 2) (as well in helper_fns.py)
>>> tim = np.linspace(-3,90,1000); data = tim**2
>>> filter_window = 30; new_sample_int = 30
>>> filter_and_resample(tim, data, filter_window, new_sample_int)
(array([ -0., 30., 60., 90.]), array([ 62.98183318, 975.90237234, 3678.22848073, 6826.19355542]))
>>> data = np.ma.MaskedArray(data)
>>> filter_and_resample(tim, data, filter_window, new_sample_int)
(array([ -0., 30., 60., 90.]), array([ 62.98183318, 975.90237234, 3678.22848073, 6826.19355542]))
>>> data[1:10] = np.ma.masked
>>> filter_and_resample(tim, data, filter_window, new_sample_int)
(array([ -0., 30., 60., 90.]), array([ 65.73049119, 975.90237234, 3678.22848073, 6826.19355542]))
|