# Simple example using iir
import dascore as dc
= dc.get_example_patch()
patch = patch.decimate(time=10, filter_type='iir')
decimated_irr # Example using fir along distance dimension
= patch.decimate(distance=10, filter_type='fir') decimated_fir
decimate
Decimate a patch along a dimension.
Parameters
Parameter | Description |
---|---|
filter_type | filter type to use to avoid aliasing. Options are: iir - infinite impulse response fir - finite impulse response None - No pre-filtering |
copy | If True, copy the decimated data array. This is needed if you want the old array to get gc’ed to free memory otherwise a view is returned. Only applies when filter_type == None. |
**kwargs |
Used to pass dimension and factor. For example time=10 is 10x decimation along the time axis.
|
Note
Simply uses scipy.signal.decimate if filter_type is specified. Otherwise, just slice data long specified dimension only including every n samples.