|
gstlal 1.13.0
|
Public Member Functions | |
| __init__ (self) | |
| None | set_phase (self, lal.REAL8FrequencySeries psd, float f_low=10.0, float m1=1.4, float m2=1.4) |
| Tuple[numpy.ndarray, int, int] | psd_to_linear_phase_whitening_fir_kernel (self, lal.REAL8FrequencySeries psd, Optional[bool] invert=True, Optional[float] nyquist=None) |
| Tuple[numpy.ndarray, numpy.ndarray] | linear_phase_fir_kernel_to_minimum_phase_whitening_fir_kernel (self, numpy.ndarray linear_phase_kernel, int sample_rate) |
Public Attributes | |
| revplan = None | |
| fwdplan = None | |
| target_phase = None | |
| target_phase_mask = None | |
Definition at line 31 of file kernels.py.
| python.kernels.PSDFirKernel.__init__ | ( | self | ) |
Definition at line 32 of file kernels.py.
| Tuple[numpy.ndarray, numpy.ndarray] python.kernels.PSDFirKernel.linear_phase_fir_kernel_to_minimum_phase_whitening_fir_kernel | ( | self, | |
| numpy.ndarray | linear_phase_kernel, | ||
| int | sample_rate ) |
Compute the minimum-phase response filter (zero latency)
associated with a linear-phase response filter (latency
equal to half the filter length).
From "Design of Optimal Minimum-Phase Digital FIR Filters
Using Discrete Hilbert Transforms", IEEE Trans. Signal
Processing, vol. 48, pp. 1491-1495, May 2000.
Args:
linear_phase_kernel:
numpy.ndarray, the kernel to compute the minimum-phase kernel with
sample_rate:
int, the sample rate
Returns:
Tuple[numpy.ndarray. numpy.ndarray], the kernel and the phase response.
The kernel is a numpy array containing the filter kernel. The kernel
can be used, for example, with gstreamer's stock audiofirfilter element.
Definition at line 211 of file kernels.py.
| Tuple[numpy.ndarray, int, int] python.kernels.PSDFirKernel.psd_to_linear_phase_whitening_fir_kernel | ( | self, | |
| lal.REAL8FrequencySeries | psd, | ||
| Optional[bool] | invert = True, | ||
| Optional[float] | nyquist = None ) |
Compute an acausal finite impulse-response filter kernel
from a power spectral density conforming to the LAL
normalization convention, such that if colored Gaussian
random noise with the given PSD is fed into an FIR filter
using the kernel the filter's output will be zero-mean
unit-variance Gaussian random noise. The PSD must be
provided as a lal.REAL8FrequencySeries object.
The phase response of this filter is 0, just like whitening
done in the frequency domain.
Args:
psd:
lal.REAL8FrequencySeries, the reference PSD
invert:
bool, default true, whether to invert the kernel
nyquist:
float, disabled by default, whether to change
the Nyquist frequency.
Returns:
Tuple[numpy.ndarray, int, int], the kernel, latency,
sample rate pair. The kernel is a numpy array containing
the filter kernel, the latency is the filter latency in
samples and the sample rate is in Hz. The kernel and
latency can be used, for example, with gstreamer's stock
audiofirfilter element.
Definition at line 81 of file kernels.py.
| None python.kernels.PSDFirKernel.set_phase | ( | self, | |
| lal.REAL8FrequencySeries | psd, | ||
| float | f_low = 10.0, | ||
| float | m1 = 1.4, | ||
| float | m2 = 1.4 ) |
Compute the phase response of zero-latency whitening filter given a reference PSD.
Definition at line 38 of file kernels.py.
| python.kernels.PSDFirKernel.fwdplan = None |
Definition at line 34 of file kernels.py.
| python.kernels.PSDFirKernel.revplan = None |
Definition at line 33 of file kernels.py.
| python.kernels.PSDFirKernel.target_phase = None |
Definition at line 35 of file kernels.py.
| python.kernels.PSDFirKernel.target_phase_mask = None |
Definition at line 36 of file kernels.py.