pyFDN.hook_module#

pyFDN.hook_module(value, nfft, *, name, device=None, dtype=None, alias_decay_db=0.0)[source]#

One FLAMO module for a filter hook, from an SOS bank, a module, or several.

The three hooks of assemble_fdn_core() each take a single module, but what a caller has is often an (n_sections, 6, n_channels) SOS array, and occasionally more than one thing to put in the same position. This resolves all three cases:

  • None – no module.

  • an array – built with sos_filter_module().

  • a FLAMO module – passed through.

  • a sequence of the above – composed into a Series in the given order, with leaves named {name}_0, {name}_1, …

Parameters:
  • value (Any) – What to put in the hook.

  • nfft (int) – FFT size, matching the rest of the model.

  • name (str) – The hook’s name ("post_delay", "post_matrix", "post_output"), used to name the leaves of a composed Series.

Return type:

Any