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 Wienerfiltered timeseries
 Parameters
 tarray_like
evenlysampled time series, length N
 harray_like
observations at each t
 signalstr (optional)
currently only ‘gaussian’ is supported
 noisestr (optional)
currently only ‘flat’ is supported
 return_PSDsbool (optional)
if True, then return (PSD, P_S, P_N)
 signal_guesstuple (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_guesstuple (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_smoothndarray
a smoothed version of h, length N
See also
scipy.signal.wiener
a static (nonadaptive) wiener filter
Notes
The Wiener filter operates by fitting a functional form to the PSD:
PSD = P_S + P_N
The resulting frequencyspace 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
andnoise_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. Forgaussian
, the params are (amplitude, width). Forflat
, the params are (amplitude,).