pyFDN.wrap_fdn_shell#

pyFDN.wrap_fdn_shell(core, *, nfft, dtype=None)[source]#

Wrap an FDN core in a FLAMO Shell that returns the impulse response.

The shell is FFT in, impulse response out: the input layer is an FFT and the output layer the iFFTAntiAlias that matches the core’s own alias_decay_db. A pyFDN model therefore means one thing wherever it is used – rendered, analyzed or trained – and the time domain is a property of how the model was built rather than something a caller sets afterwards.

The core evaluates the system on a circle of radius \(\gamma < 1\), so its response carries a \(\gamma^n\) envelope; the output layer removes it again. What comes out is the true impulse response, accurate to alias_decay_db (see pyFDN.trainable_from_build()). At alias_decay_db=0 the layer is an ordinary inverse FFT.

Parameters:
  • core (Any) – FDN core, e.g. from assemble_fdn_core(). Its alias_decay_db is read back off it, so the output layer cannot disagree with the modules it undoes.

  • nfft (int) – FFT size.

  • dtype (Any) – Dtype for the FFT/iFFT layers; defaults to float32.

Return type:

Any

See also

pyFDN.model_response

the shell’s output as a Response, including the magnitude spectrum a frequency-domain view wants.