expyfun.stimuli.texture_ERB#

expyfun.stimuli.texture_ERB(n_freqs=20, n_coh=None, rho=1.0, seq=('inc', 'nb', 'inc', 'nb'), fs=24414.0625, dur=1.0, SAM_freq=7.0, random_state=None, freq_lims=(200, 8000), verbose=True)[source]#

Create ERB texture stimulus

Parameters:
n_freqsint

Number of tones in mixture (default 20).

n_cohint | None

Number of tones to be temporally coherent. Default (None) is int(np.round(n_freqs * 0.8)).

rhofloat

Correlation between the envelopes of grouped tones (default is 1.0).

seqlist

Sequence of incoherent (‘inc’), coherent noise envelope (‘nb’), and SAM (‘sam’) mixtures. Default is ('inc', 'nb', 'inc', 'nb').

fsfloat

Sampling rate in Hz.

durfloat

Duration (in seconds) of each token in seq (default is 1.0).

SAM_freqfloat

The SAM frequency to use.

random_stateNone | int | np.random.RandomState

The random generator state used for band selection and noise envelope generation.

freq_limstuple

The lower and upper frequency limits (default is (200, 8000)).

verbosebool

If True, print the resulting ERB spacing.

Returns:
xndarray, shape (n_samples,)

The stimulus, where n_samples = len(seq) * (fs * dur) (approximately).

Notes

This function requires MNE.

Examples using expyfun.stimuli.texture_ERB#

Generate texture stimuli

Generate texture stimuli