pyFDN.kronecker_matrix#

pyFDN.kronecker_matrix(angles, kernel_type='rotation')[source]#

Build the explicit Kronecker feedback matrix Psi_M.

Formed by the recursion Psi_0 = 1, Psi_m = K_m kron Psi_{m-1}, so angles[0] is the innermost kernel theta_1 and angles[-1] the outermost theta_M. The result is orthogonal for any angles.

Use this for analysis and plotting; for rendering prefer kronecker_transform(), which never forms the matrix and costs O(N log2 N) per input vector.

Parameters:
  • angles (ArrayLike) – M kernel angles in radians, innermost first.

  • kernel_type (str | Sequence[str]) – "rotation" or "reflection", either once for all kernels or one per kernel (innermost first).

Return type:

ndarray

Returns:

  • np.ndarray – Orthogonal matrix of shape (2**M, 2**M).

  • Example:: – >>> import numpy as np >>> A = kronecker_matrix([np.pi / 4] * 3, “reflection”) >>> np.allclose(A @ A.T, np.eye(8)) True