pyFDN.td.MatrixFIR#

class pyFDN.td.MatrixFIR(coeffs)[source]#

Stateful matrix of FIR filters (e.g. a paraunitary scattering feedback matrix).

Every matrix entry is an FIR filter run with scipy.signal.lfilter(); state persists across process_block() calls. For long impulse responses use MatrixConvolver instead, which computes the same convolution by FFT.

Parameters:

coeffs (ArrayLike) – FIR coefficients of shape (n_out, n_in, n_taps) in the z^{-1} convention (coeffs[i, j, k] is the tap of z^{-k} from input j to output i).

Notes

An FIR feedback matrix is not a DSS matrix: pass an instance as post_matrix to pyFDN.dss_to_td(), with A the identity.

__init__(coeffs)[source]#

Methods

__init__(coeffs)

impulse_response(ir_len)

Impulse response from zero state, one Dirac per input channel.

process_block(block)

Process one block and advance internal state.

process_signal(signal, *[, squeeze])

Process a whole signal in one call, from the current state.

reset()

Clear internal state (no-op for stateless operators).

Attributes

in_channels

out_channels

process_block(block)[source]#

Process one block and advance internal state.

Return type:

ndarray

reset()[source]#

Clear internal state (no-op for stateless operators).

Return type:

None