meegsim.waveform.narrowband_oscillation#

meegsim.waveform.narrowband_oscillation(n_series, times, *, fmin=None, fmax=None, order=2, random_state=None)[source]#

Generate oscillatory-like time series by filtering white noise in a requested frequency band.

Parameters:
n_seriesint

The number of time series to generate.

timesarray

Array of time points (each one represents time in seconds).

fminNone (default) or float

Lower cutoff frequency (in Hz). If None (default), 8 Hz are used as the cutoff.

fmaxNone (default) or float

Upper cutoff frequency (in Hz). If None (default), 12 Hz are used as the cutoff.

orderint, optional

The order of the filter. By default, the order is equal to 2.

random_stateNone (default) or int

Seed for the random number generator. If None (default), results will vary between function calls. Use a fixed value for reproducibility.

Returns:
outarray, shape (n_series, n_times)

Generated filtered white noise.

Examples using meegsim.waveform.narrowband_oscillation#

Minimal example

Minimal example

Random state and reproducibility

Random state and reproducibility

Plotting the configuration

Plotting the configuration

Phase-phase coupling based on von Mises distribution

Phase-phase coupling based on von Mises distribution

Phase-phase coupling using shifted copy with noise

Phase-phase coupling using shifted copy with noise

Adjustment of global SNR

Adjustment of global SNR

Adjustment of local SNR

Adjustment of local SNR

Controlling the standard deviation of activity

Controlling the standard deviation of activity

Adding sensor space noise

Adding sensor space noise