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
Apply a Sobel filter.
Parameters
Parameter | Description |
---|---|
**kwargs | Used to specify the dimension, mode, and for the ‘constant’ mode, cval. |