eelbrain.gammatone_bank

eelbrain.gammatone_bank(wav, f_min, f_max, n, tstep=None, integration_cycles=None, integration_window=None, location='right', name=None)

Gammatone filterbank response

Parameters:
  • wav (NDVar) – Sound input.

  • f_min (float) – Lower frequency cutoff.

  • f_max (float) – Upper frequency cutoff.

  • n (int) – Number of filter channels.

  • tstep (float) – Time step size in the output (default is same as wav).

  • integration_cycles (float) – Number of cycles over which to integrate filter output (default 2).

  • integration_window (float) – Integration time window in seconds (can be specified as alternative to integration_cycles; e.g. 0.010 for 10 ms).

  • location (Literal['left', 'right']) –

    Location of the output relative to the input time axis:

    • right: gammatone sample at end of integration window (default)

    • left: gammatone sample at beginning of integration window

    Since gammatone filter response depends on integration_window, the filter response will be delayed relative to the analytic envelope. To prevent this delay, use location=’left’

  • name (str) – NDVar name (default is wav.name).

Return type:

NDVar

Notes

This function uses the Gammatone library, which can be instaled with:

$ pip install gammatone