eelbrain.NDVar.envelope

NDVar.envelope(dim='time', name=None)

Compute the Hilbert envelope of a signal

Parameters
  • dim (str) – Dimension over which to compute the envelope (default ‘time’).

  • name (str) – Name of the output NDVar (default is the current name).

Returns

envelope – NDVar with identical dimensions containing the envelope.

Return type

NDVar

Notes

The Hilbert envelope is computed with scipy.signal.hilbert():

>>> numpy.abs(scipy.signal.hilbert(x))

This function can be very slow when the number of time samples is uneven.