src.canns.analyzer.slow_points.fixed_points

FixedPoints data container class for storing fixed point analysis results.

Classes

FixedPoints

Container for storing and manipulating fixed points.

Module Contents

class src.canns.analyzer.slow_points.fixed_points.FixedPoints(xstar=None, F_xstar=None, x_init=None, inputs=None, qstar=None, dq=None, n_iters=None, J_xstar=None, dFdu=None, eigval_J_xstar=None, eigvec_J_xstar=None, is_stable=None, cond_id=None, tol_unique=0.001, dtype=np.float32)[source]

Container for storing and manipulating fixed points.

This class stores fixed points found by the FixedPointFinder algorithm, along with associated metadata like Jacobians, eigenvalues, and stability.

xstar[source]

[n x n_states] array of fixed point states.

F_xstar[source]

[n x n_states] array of states after one RNN step from xstar.

x_init[source]

[n x n_states] array of initial states used for optimization.

inputs[source]

[n x n_inputs] array of constant inputs during optimization.

qstar[source]

[n,] array of final q values (optimization objective).

dq[source]

[n,] array of change in q at the last optimization step.

n_iters[source]

[n,] array of iteration counts for each optimization.

J_xstar[source]

[n x n_states x n_states] array of Jacobians dF/dx at fixed points.

dFdu[source]

[n x n_states x n_inputs] array of Jacobians dF/du at fixed points.

eigval_J_xstar[source]

[n x n_states] complex array of eigenvalues.

eigvec_J_xstar[source]

[n x n_states x n_states] complex array of eigenvectors.

is_stable[source]

[n,] bool array indicating stability (max |eigenvalue| < 1).

cond_id[source]

[n,] array of condition IDs (optional).

tol_unique[source]

Tolerance for identifying unique fixed points.

dtype[source]

NumPy dtype for data storage.

Initialize a FixedPoints object.

Parameters:
  • xstar (numpy.ndarray | None) – Fixed point states [n x n_states].

  • F_xstar (numpy.ndarray | None) – States after one RNN step [n x n_states].

  • x_init (numpy.ndarray | None) – Initial states [n x n_states].

  • inputs (numpy.ndarray | None) – Constant inputs [n x n_inputs].

  • qstar (numpy.ndarray | None) – Final q values [n,].

  • dq (numpy.ndarray | None) – Change in q at last step [n,].

  • n_iters (numpy.ndarray | None) – Iteration counts [n,].

  • J_xstar (numpy.ndarray | None) – Jacobians dF/dx [n x n_states x n_states].

  • dFdu (numpy.ndarray | None) – Jacobians dF/du [n x n_states x n_inputs].

  • eigval_J_xstar (numpy.ndarray | None) – Eigenvalues [n x n_states] (complex).

  • eigvec_J_xstar (numpy.ndarray | None) – Eigenvectors [n x n_states x n_states] (complex).

  • is_stable (numpy.ndarray | None) – Stability flags [n,].

  • cond_id (numpy.ndarray | None) – Condition IDs [n,].

  • tol_unique (float) – Tolerance for uniqueness detection.

  • dtype – NumPy data type for storage.

__getitem__(idx)[source]

Index into the fixed points.

Parameters:

idx – Integer index, slice, or array of indices.

Returns:

A new FixedPoints object containing the indexed subset.

__len__()[source]

Return the number of fixed points.

decompose_jacobians(verbose=False)[source]

Compute eigendecomposition of Jacobians and determine stability.

Computes eigenvalues and eigenvectors for self.J_xstar and determines stability based on whether max |eigenvalue| < 1.

Parameters:

verbose (bool) – Whether to print status messages.

get_unique()[source]

Identify and return unique fixed points.

Uniqueness is determined by Euclidean distance in the concatenated (xstar, inputs) space. Among duplicates, keeps the one with lowest qstar.

Returns:

A new FixedPoints object containing only unique fixed points.

print_summary()[source]

Print a summary of the fixed points.

F_xstar = None[source]
J_xstar = None[source]
cond_id = None[source]
dFdu = None[source]
dq = None[source]
dtype[source]
eigval_J_xstar = None[source]
eigvec_J_xstar = None[source]
property has_decomposed_jacobians: bool[source]

Check if Jacobians have been decomposed.

inputs = None[source]
is_stable = None[source]
n_iters = None[source]
qstar = None[source]
tol_unique[source]
x_init = None[source]
xstar = None[source]