parse_filter#

gwpy.signal.filter_design.parse_filter(
filt: TapsType | BAType | signal.TransferFunction,
) tuple[Literal['ba'], BAType][source]#
gwpy.signal.filter_design.parse_filter(filt: SosType) tuple[Literal['sos'], SosType]
gwpy.signal.filter_design.parse_filter(
filt: ZpkCompatible | LinearTimeInvariant,
) tuple[Literal['zpk'], ZpkType]

Parse arbitrary input args into a TF, ZPK, or SOS filter definition.

No transformations are applied to the filter, it is simply unpacked into a standard form.

Parameters:
filtnumpy.ndarray or tuple

Filter definition. Any of the following formats are supported:

Returns:
ftypestr

Either 'ba' 'zpk' or 'sos'.

filtnumpy.ndarray or tuple

The filter components for the returned ftype. If 'ba', a 2-tuple of numerator and denominator arrays. If 'zpk', a 3-tuple of zeros, poles, and gain. If 'sos', a 2D array of second-order sections.