import dascore
from dascore.units import m, s
pa = dascore.get_example_patch()
# Apply Gaussian smoothing along time axis.
pa_1 = pa.gaussian_filter(time=0.1)
# Apply Gaussian filter over distance dimension
# using a 3 sample standard deviation.
pa_2 = pa.gaussian_filter(samples=True, distance=3)
# Apply filter to time and distance axis.
pa_3 = pa.gaussian_filter(time=0.1, distance=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.