sobel_filter

function of dascore.proc.filter source

sobel_filter(
    patch: Patch ,
    dim: str ,
    mode ,
    cval ,
)-> Patch

Apply a Sobel filter.

Parameters

Parameter Description
**kwargs Used to specify the dimension, mode, and for the ‘constant’ mode, cval.

Examples

import dascore
pa = dascore.get_example_patch()

 # 1. Apply Sobel filter using the default parameter values.
sobel_default = pa.sobel_filter(dim='time', mode='reflect', cval=0.0)

 # 2. Apply Sobel filter with arbitrary parameter values.
sobel_arbitrary = pa.sobel_filter(dim='time', mode='constant', cval=1)

# 3. Apply Sobel filter along both axes
sobel_time_space = pa.sobel_filter('time',).sobel_filter('distance')