This documentation is for astroML version 0.2

This page

Links

astroML Mailing List

GitHub Issue Tracker

Videos

Scipy 2012 (15 minute talk)

Scipy 2013 (20 minute talk)

Citing

If you use the software, please consider citing astroML.

11.9.2. astroML.filters.wiener_filter

astroML.filters.wiener_filter(t, h, signal='gaussian', noise='flat', return_PSDs=False, signal_params=None, noise_params=None)[source]

Compute a Wiener-filtered time-series

Parameters :

t : array_like

evenly-sampled time series, length N

h : array_like

observations at each t

signal : str (optional)

currently only ‘gaussian’ is supported

noise : str (optional)

currently only ‘flat’ is supported

return_PSDs : bool (optional)

if True, then return (PSD, P_S, P_N)

signal_guess : tuple (optional)

A starting guess at the parameters for the signal. If not specified, a suitable guess will be estimated from the data itself. (see Notes below)

noise_guess : tuple (optional)

A starting guess at the parameters for the noise. If not specified, a suitable guess will be estimated from the data itself. (see Notes below)

Returns :

h_smooth : ndarray

a smoothed version of h, length N

See also

scipy.signal.wiener
a static (non-adaptive) wiener filter

Notes

The Wiener filter operates by fitting a functional form to the PSD:

PSD = P_S + P_N

The resulting frequency-space filter is given by:

Phi = P_S / (P_S + P_N)

This entire operation is equivalent to a kernel smoothing by a kernel whose Fourier transform is Phi.

the arguments signal_guess and noise_guess specify the initial guess for the characteristics of signal and noise used in the minimization. They are generally expected to be tuples, and the meaning varies depending on the form of signal and noise used. For gaussian, the params are (amplitude, width). For flat, the params are (amplitude,).