11.9.3. astroML.filters.min_component_filter

astroML.filters.min_component_filter(x, y, feature_mask, p=1, fcut=None, Q=None)[source]

Minimum component filtering

Minimum component filtering is useful for determining the background component of a signal in the presence of spikes

Parameters
xarray_like

1D array of evenly spaced x values

yarray_like

1D array of y values corresponding to x

feature_maskarray_like

1D mask array giving the locations of features in the data which should be ignored for smoothing

pinteger (optional)

polynomial degree to be used for the fit (default = 1)

fcutfloat (optional)

the cutoff frequency for the low-pass filter. Default value is f_nyq / sqrt(N)

Qfloat (optional)

the strength of the low-pass filter. Larger Q means a steeper cutoff default value is 0.1 * fcut

Returns
y_filteredndarray

The filtered version of y.

Notes

This code follows the procedure explained in the book “Practical Statistics for Astronomers” by Wall & Jenkins book, as well as in Wall, J, A&A 122:371, 1997