expyfun.stimuli.window_edges

expyfun.stimuli.window_edges(sig, fs, dur=0.01, axis=-1, window='hann', edges='both')[source]

Window the edges of a signal (e.g., to prevent “pops”)

Parameters:
sigarray-like

The array to window.

fsfloat

The sample rate.

durfloat

The duration to window on each edge. The default is 0.01 (10 ms).

axisint

The axis to operate over.

windowstr

The window to use. For a list of valid options, see scipy.signal.get_window(), but can also be ‘dpss’.

edgesstr

Can be 'leading', 'trailing', or 'both' (default).

Returns:
windowed_sigarray-like

The modified array (float64).

Examples using expyfun.stimuli.window_edges

Generate more advanced auditory stimuli

Generate more advanced auditory stimuli

Generate vocoded stimuli

Generate vocoded stimuli

Examine and manipulate stimulus power

Examine and manipulate stimulus power