pyFDN.flamo_to_pr#
- pyFDN.flamo_to_pr(model=None, *, decomposition=None, mode='eai', lf_max_seconds=3.0, response_tolerance=1e-08, allow_approximate=False, deflation_type='full', reject_unstable_poles=False, quality_threshold=1e-10, maximum_iterations=50, refinement_tol=1e-12, svd_refine=True, symmetrize=True, verbose=False, 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
modelor adecompositionfromflamo_decompose_for_pr().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 bypyFDN.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
feedforwardto size the pole search.No nested recursion. A
Recursionplaced inside another loop’s feedforward/feedback (e.g. an allpass realized as its own sub-FDN) is not supported: its internal poles are folded intoF(z)byprobebut are not roots of the outerdet Pand 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.- param mode:
The experimental Lindsey-Fox route constructs a real scalar polynomial, searches adaptive grids, refines against the original matrix, and checks the sampled all-port and external responses. Failed search or validation raises without calling EAI. Requires float64 models and an explicit
num_polesfor FIR feedback matrices.- type mode:
- param lf_max_seconds:
LF root-search budget, checked between numerical operations. Coefficient construction, refinement, and validation are outside it.
- type lf_max_seconds:
- param response_tolerance:
Maximum relative L2 and normalized peak errors on the validation contour. This sampled check is not a uniform frequency-response error bound.
- type response_tolerance:
- param allow_approximate:
For mode=”eai” only: permit an incomplete EAI result only if both response checks pass. Metadata reports
complete=False,approximate, andomittedPoleCount; a warning is emitted. No poles are silently omitted and no approximation is allowed by default.- type allow_approximate:
- 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:
- param svd_refine:
Run a per-pole SVD null-vector Newton step after the Ehrlich-Aberth loop.
- type svd_refine:
- param symmetrize:
Enforce exact conjugate-pair symmetry on the refined pole set before
reduce_conjugate_pairs().- type symmetrize:
Notes
Complete results report
complete=Trueand expected/returned pole counts. Direct EAI checks the count but does not run response validation for complete results (responseValidation=None). LF and all incomplete results require response validation. Unsupported multiple poles raise.- Return type:
tuple[PoleResidue,dict[str,Any]]