fir_from_transfer#

gwpy.signal.filter_design.fir_from_transfer(
transfer: Array1D,
ntaps: int,
window: WindowLike = 'hann',
ncorner: int | None = None,
) NDArray[source]#

Design a Type II FIR filter given an arbitrary transfer function.

Parameters:
transfernumpy.ndarray

Transfer function to start from, must have at least ten samples.

ntapsint

Number of taps in the final filter, must be an even number.

windowstr, numpy.ndarray, optional

Window function to truncate with, see scipy.signal.get_window for details on acceptable formats.

ncornerint, optional

Number of extra samples to zero off at low frequency.

Returns:
outnumpy.ndarray

A time domain FIR filter of length ntaps.

See also

scipy.signal.remez

An alternative FIR filter design using the Remez exchange algorithm.

Notes

The final FIR filter will use rfft FFT normalisation.

If ncorner is not None, then ncorner extra samples will be zeroed on the left as a hard highpass filter.