pyFDN.sos_gain_per_sample_curves#

pyFDN.sos_gain_per_sample_curves(sos, delays, nfft=512)[source]#

Magnitude response (gain per sample vs angle) for a per-channel SOS bank.

Evaluates \(|H(e^{j\omega})|\) at nfft angles from 0 to \(\pi\) (Nyquist) for each channel’s SOS cascade, then scales by delay length so that the result is gain per sample: for channel j with delay m_j, the curve is \(|H|^{1/m_j}\), so that after m_j samples the effective gain is \(|H|\). Useful for plotting absorption/gain curves (e.g. on a pole plot).

Parameters:
  • sos ((n_sections, 6, N) array) – Per-channel SOS bank; section rows are [b0, b1, b2, a0, a1, a2]. Same format as one_pole_absorption() / first_order_absorption() return.

  • delays ((N,) array-like) – Delay lengths in samples, one per channel. Used to scale gain to per-sample.

  • nfft (int) – Number of frequency points (default 512).

Return type:

tuple[ndarray, ndarray]

Returns:

  • angles ((nfft,) array) – Angles in rad/sample, 0 to pi.

  • magnitude ((nfft, N) array) – Gain per sample (linear), i.e. \(|H(e^{j\omega})|^{1/m}\) per channel.