import dascore
= dascore.get_example_patch()
pa # 1. Apply Sobel filter using the default parameter values.
= pa.sobel_filter(dim='time', mode='reflect', cval=0.0)
sobel_default # 2. Apply Sobel filter with arbitrary parameter values.
= pa.sobel_filter(dim='time', mode='constant', cval=1)
sobel_arbitrary # 3. Apply Sobel filter along both axes
= pa.sobel_filter('time').sobel_filter('distance') sobel_time_space
sobel_filter
sobel_filter(
patch: Patch ,
dim: str ,
mode = reflect,
cval = 0.0,
)-> ‘PatchType’
Apply a Sobel filter.
Parameters
Parameter | Description |
---|---|
dim | The dimension along which to apply |
mode |
Determines how the input array is extended when the filter overlaps with a border. |
cval | Fill value when mode=“constant”. |