import dascore
from dascore.units import m, s
= dascore.get_example_patch()
pa
# Apply Gaussian smoothing along time axis.
= pa.gaussian_filter(time=0.1)
pa_1
# Apply Gaussian filter over distance dimension
# using a 3 sample standard deviation.
= pa.gaussian_filter(samples=True, distance=3)
pa_2
# Apply filter to time and distance axis.
= pa.gaussian_filter(time=0.1, distance=3) pa_3
gaussian_filter
gaussian_filter(
patch: Patch ,
samples = False,
mode = reflect,
cval = 0.0,
truncate = 4.0,
**kwargs ,
)-> ‘PatchType’
Applies a Gaussian filter along specified dimensions.
Parameters
Parameter | Description |
---|---|
patch | The patch to filter |
samples |
If True samples are specified If False coordinate of dimension |
mode | The mode for handling edges. |
cval | The constant value for when mode == constant. |
truncate | Truncate the filter kernel length to this many standard deviations. |
**kwargs |
Used to specify the sigma value (standard deviation) for desired dimensions. |
Examples
Note
See scipy.ndimage.gaussian_filter for more info on implementation and arguments.