mne_connectivity.make_signals_in_freq_bands#

mne_connectivity.make_signals_in_freq_bands(n_seeds, n_targets, freq_band, n_epochs=10, n_times=200, sfreq=100, trans_bandwidth=1, snr=0.7, connection_delay=5, tmin=0, ch_names=None, ch_types='eeg', rng_seed=None)[source]#

Simulate signals interacting in a given frequency band.

Parameters:
n_seedsint

Number of seed channels to simulate.

n_targetsint

Number of target channels to simulate.

freq_bandtuple of int or float

Frequency band where the connectivity should be simulated, where the first entry corresponds to the lower frequency, and the second entry to the higher frequency.

n_epochsint (default 10)

Number of epochs in the simulated data.

n_timesint (default 200)

Number of timepoints each epoch of the simulated data.

sfreqint | float (default 100)

Sampling frequency of the simulated data, in Hz.

trans_bandwidthint | float (default 1)

Transition bandwidth of the filter to apply to isolate activity in freq_band, in Hz. These are passed to the l_bandwidth and h_bandwidth keyword arguments in mne.filter.create_filter().

snrfloat (default 0.7)

Signal-to-noise ratio of the simulated data in the range [0, 1].

connection_delayint (default 5)

Number of timepoints for the delay of connectivity between the seeds and targets. If > 0, the target data is a delayed form of the seed data. If < 0, the seed data is a delayed form of the target data.

tminint | float (default 0)

Earliest time of each epoch.

ch_nameslist of str | None (default None)

Names of the channels in the simulated data. If None, the channels are named according to their index and the frequency band of interaction. If specified, must be a list of n_seeds + n_targets channel names.

ch_typesstr | list of str (default “eeg”)

Types of the channels in the simulated data. If specified as a list, must be a list of n_seeds + n_targets channel names.

rng_seedint | None (default None)

Seed to use for the random number generator. If None, no seed is specified.

Returns:
epochsmne.EpochsArray of shape (n_epochs, n_seeds + n_targets, n_times)

The simulated data stored in an mne.EpochsArray object. The channels are arranged according to seeds, then targets.

Notes

Signals are simulated as a single source of activity in the given frequency band and projected into n_seeds + n_targets noise channels.

Examples using mne_connectivity.make_signals_in_freq_bands#

Comparison of coherency-based methods

Comparison of coherency-based methods

Compute multivariate coherency/coherence

Compute multivariate coherency/coherence