pyFDN.flamo_to_pr#

pyFDN.flamo_to_pr(model=None, *, decomposition=None, deflation_type='fullDeflation', reject_unstable_poles=False, quality_threshold=1e-10, maximum_iterations=50, refinement_tol=1e-12, svd_refine=True, symmetrize=True, verbose=True, num_poles=None)[source]#

Poles/residues from a FLAMO transfer H(z) = C(z)P(z)^{-1}B(z) + D(z).

Pass either a FLAMO model or a decomposition from flamo_decompose_for_pr().

Return type:

tuple[ndarray, ndarray, ndarray, ndarray, dict[str, Any]]

Supported architecture#

The model must reduce to a single, non-nested Recursion (the canonical FDN: Parallel(branchA=Series(in_gain, Recursion, out_gain), branchB=direct), as produced by pyFDN.translate.dss_to_flamo.dss_to_flamo()). Two constraints are assumed and not auto-detected:

  • Delays live in the recursion’s feedforward path. Delay lengths are read from feedforward to size the pole search.

  • No nested recursion. A Recursion placed inside another loop’s feedforward/feedback (e.g. an allpass realized as its own sub-FDN) is not supported: its internal poles are folded into F(z) by probe but are not roots of the outer det P and would be silently dropped.

SOS-format filters (one-pole/biquad/SVF cascades stored as second-order sections) anywhere in the feedforward or feedback are supported: their poles are added to the pole count via _count_loop_filter_poles() so the Ehrlich-Aberth search is sized correctly.

type num_poles:

int | None

param num_poles:

Override the auto-detected pole count (sum(delays) plus IIR poles from loop filters). When given, this exact value sizes the Ehrlich-Aberth root search instead of the detected order. Use it when the loop order is known independently (e.g. the characteristic-polynomial degree) or when filters sit where _count_loop_filter_poles() cannot see them.

type num_poles:

int or None, default None

type svd_refine:

bool

param svd_refine:

Run a per-pole SVD null-vector Newton step after the Ehrlich-Aberth loop.

type svd_refine:

bool, default True

type symmetrize:

bool

param symmetrize:

Enforce exact conjugate-pair symmetry on the refined pole set before reduce_conjugate_pairs().

type symmetrize:

bool, default True