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.
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"RandomDense"(dense cascaded paraunitary matrix),"Velvet"(sparse velvet-noise feedback matrix), or"FromElementals"(cascade of degree-one lossless factors, polynomial degreeN * num_stages). 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"FromElementals").sparsity (
float) – Sparsity of the"Velvet"type (ignored otherwise).stage_matrix_type (
str) – Stage matrix for"RandomDense"and"Velvet":"Hadamard"or"random"(random orthogonal; avoids the structural double poles at z = ±1 of Hadamard stages).
- Return type:
- 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)