pyFDN.track_poles#

pyFDN.track_poles(model, path, poles, *, t0=0.0, t1=1.0, order=None, max_step=0.1, min_step=0.0001, max_newton=8)[source]#

Follow poles of a FLAMO loop while its parameters move along a path.

A predictor-corrector continuation: an Euler step in log z from the eigenvalue derivative, then SVD-Newton at the new path position. A step is accepted only if every track converges, moves less than a quarter of the mean pole spacing 2 pi / order from its prediction, keeps its singular vector (|r_new^H r_old| >= 0.9, so it has not jumped to a neighbour) and stays apart from the other tracks; otherwise the step is halved. A track still failing at min_step is marked lost (NaN) and the others go on.

Parameters:
  • model (Any) – A float64 model with one non-nested Recursion (as from pyFDN.dss_to_flamo()), or the Recursion itself. Nested loops put the inner loop’s poles into det P and are not supported.

  • path (Callable[[Tensor], Mapping[str, Tensor]]) – path(t) maps a 0-d float64 tensor t to new values for some of the Recursion’s parameters, by their named_parameters() names (stored values, before FLAMO’s map). Build them with torch operations so the derivative in t flows. For a gain, step in dB: lambda t: {"feedback.param": g0 * (g1 / g0) ** t * A}.

  • poles (Any) – Poles at t0, e.g. from seed_poles().

  • t0 (float) – Start and end of the path; t1 < t0 tracks backwards.

  • t1 (float) – Start and end of the path; t1 < t0 tracks backwards.

  • order (int | None) – Degree of det P(z); see seed_poles().

  • max_step (float) – Bounds on the step in t.

  • min_step (float) – Bounds on the step in t.

  • max_newton (int) – Newton iterations allowed per step.

Returns:

Accepted path positions with the poles and their singular vectors.

Return type:

PoleTracks