pyFDN.td.SOSBank#
- class pyFDN.td.SOSBank(sos)[source]#
Stateful per-channel SOS filter cascade (e.g. in-loop absorption).
One cascade of second-order sections per channel, filtered with
scipy.signal.sosfilt(). State persists acrossfilter()calls, so a long signal can be processed in consecutive blocks.- Parameters:
sos (
ArrayLike) – Per-channel SOS bank of shape(n_sections, 6, N)whereN = num_channels. Section rows are[b0, b1, b2, a0, a1, a2]. This is the canonical SOS bank layout in pyFDN: it matches the FLAMOparallelSOSFilterinput and the output ofpyFDN.decay_to_first_order_shelf(),pyFDN.decay_to_one_pole(), andpyFDN.decay_to_geq().- Variables:
sos – The same bank in the
(N, n_sections, 6)layoutscipy.signal.sosfilt()expects, one cascade per row.
Notes
Pass an instance as
post_delaytopyFDN.process_fdn()to apply frequency-dependent absorption inside the feedback loop.pyFDN.build_to_impz()also constructs this class internally when anpyFDN.FDNBuildcontains per-delay-linefilters.Methods
__init__(sos)filter(block)Filter one block and advance internal state.
process(signal, *[, squeeze])Filter a whole signal in one call, from the current state.
reset()Clear internal state (no-op for stateless operators).
Attributes
in_channelsout_channels