xoa.filter

xoa.filter#

Filtering utilities.

Provides spatial and temporal filters including convolution-based smoothing, tidal filters (Demerliac, Godin), mask erosion and point decimation.

Functions

convolve(data, kernel[, normalize, ...])

N-dimensional convolution that takes care of nans

decimate(obj, radius[, method, stack_dim, ...])

Decimate a data array or dataset by removing too close points

demerliac(da[, na_thres, dt_tol])

Apply a Demerliac filter on a data array

erode_coast(data[, until, kernel, xdim, ydim])

Just like erode_mask() but specialized for the horizontal dimensions

erode_mask(data[, until, kernel])

Erode the horizontal mask using smoothing

generate_isotropic_kernel(shape, window_func)

Generate an nD isotropic kernel given a shape and a window function

generate_kernel(kernel, data[, window_func, ...])

Generate a kernel that is compatible with a given data array

generate_orthogonal_kernel(kernels[, ...])

Generate an nD kernel from orthogonal 1d kernels

get_window_func(window, **kwargs)

Get a window function from its name

shapiro_kernel(dims)

Generate a shapiro kernel

smooth(data, kernel, **kwargs)

A shortcut to convolve(data, kernel, normalize=True)

tidal_filter(da, filter_name[, na_thres, dt_tol])

Apply a tidal filter on a data array

Classes

decimation_methods(*values)

Supported decimate() methods