median_filter

function of dascore.proc.filter source

median_filter(
    patch: Patch ,
    kernel_size ,
)-> Patch

Apply 2-D median filter

Parameters

Parameter Description
kernel_size: array_like, optional A scalar or a list of length 2, giving the size of the median filter window in each dimension. Elements of kernel_size should be odd. If kernel_size is a scalar, then this scalar is used as the size in each dimension. Default is a kernel of size (3, 3).

Examples

import dascore
pa = dascore.get_example_patch()

 # 1. Apply median filter with 9 time intervals and 5 channels
filtered_pa = pa.median_filter((9,5))

# Written by Ge Jin (gjin@mines.edu)