trackpy.bandpass

trackpy.bandpass(image, lshort, llong, threshold=None, truncate=4)

Remove noise and background variation.

Convolve with a Gaussian to remove short-wavelength noise and subtract out long-wavelength variations, retaining features of intermediate scale.

This implementation relies on scipy.ndimage.filters.gaussian_filter, and it is the fastest way known to the authors of performing a bandpass in Python.

Parameters:

image : ndarray

lshort : small-scale cutoff (noise)

llong : large-scale cutoff

for both lshort and llong:

give a tuple value for different sizes per dimension give int value for same value for all dimensions when 2*lshort >= llong, no noise filtering is applied

threshold : float or integer

By default, 1 for integer images and 1/256. for float images.

Returns:

result : array

the bandpassed image

See also

legacy_bandpass, legacy_bandpass_fftw