concatenate_zpks#

gwpy.signal.filter_design.concatenate_zpks(*zpks: ZpkCompatible) ZpkType[source]#

Concatenate a list of zero-pole-gain (ZPK) filters.

Parameters:
*zpks

One or more zero-pole-gain format, each one should be a 3-tuple containing an array of zeros, an array of poles, and a gain float.

Returns:
zerosnumpy.ndarray

The concatenated array of zeros.

polesnumpy.ndarray

The concatenated array of poles.

gainfloat

The overall gain.

Examples

Create a lowpass and a highpass filter, and combine them:

>>> from gwpy.signal.filter_design import (
...     highpass, lowpass, concatenate_zpks)
>>> hp = highpass(100, 4096)
>>> lp = lowpass(1000, 4096)
>>> zpk = concatenate_zpks(hp, lp)

Plot the filter:

>>> from gwpy.plot import BodePlot
>>> plot = BodePlot(zpk, sample_rate=4096)
>>> plot.show()

(png)

../../_images/gwpy-signal-filter_design-concatenate_zpks-1.png