pyFDN.filter_matrix_gallery#
- pyFDN.filter_matrix_gallery(N=None, matrix_type=None, *, num_stages=3, sparsity=3.0, stage_matrix_type='Hadamard')[source]#
Return an FIR (filter) feedback matrix of the requested type, or list all type names.
- Overloads:
N (int), matrix_type (str), num_stages (int), sparsity (float), stage_matrix_type (str) → np.ndarray
N (int | None), matrix_type (None), num_stages (int), sparsity (float), stage_matrix_type (str) → list[str]
N (None), matrix_type (str), num_stages (int), sparsity (float), stage_matrix_type (str) → NoReturn
All types are paraunitary (lossless):
A^T(z^{-1}) A(z) = I. Used as scattering feedback matrices in an FDN (Schlecht & Habets 2020).- Parameters:
N (
int|None) – Matrix size. Ignored whenmatrix_typeisNone.matrix_type (
str|None) – One of"random_dense"(dense cascaded paraunitary matrix),"velvet"(sparse velvet-noise feedback matrix), or"from_elementals"(cascade of degree-one lossless factors, polynomial degreeN * num_stages); the historical fdnToolbox spellings ("Velvet", …) are accepted. PassNone(or call with no arguments) to get the list of all type names.num_stages (
int) – Number of cascade stages (or degree factor for"from_elementals").sparsity (
float) – Sparsity of the"velvet"type (ignored otherwise).stage_matrix_type (
str) – Stage matrix for"random_dense"and"velvet":"Hadamard"or"random"(random orthogonal; avoids the structural double poles at z = ±1 of Hadamard stages).
- Returns:
Feedback matrix of shape
(N, N, L)in z^{-1} convention, or a list of type-name strings.
Example:
filter_matrix_gallery() # → list of type strings filter_matrix_gallery(4, "velvet", num_stages=3, sparsity=3)