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_seeds
int
Number of seed channels to simulate.
- n_targets
int
Number of target channels to simulate.
- freq_band
tuple
ofint
orfloat
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_epochs
int
(default 10) Number of epochs in the simulated data.
- n_times
int
(default 200) Number of timepoints each epoch of the simulated data.
- sfreq
int
|float
(default 100) Sampling frequency of the simulated data, in Hz.
- trans_bandwidth
int
|float
(default 1) Transition bandwidth of the filter to apply to isolate activity in
freq_band
, in Hz. These are passed to thel_bandwidth
andh_bandwidth
keyword arguments inmne.filter.create_filter()
.- snr
float
(default 0.7) Signal-to-noise ratio of the simulated data in the range [0, 1].
- connection_delay
int
(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.
- tmin
int
|float
(default 0) Earliest time of each epoch.
- ch_names
list
ofstr
|None
(defaultNone
) 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 ofn_seeds + n_targets
channel names.- ch_types
str
|list
ofstr
(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_seed
int
|None
(defaultNone
) Seed to use for the random number generator. If
None
, no seed is specified.
- n_seeds
- Returns:
- epochs
mne.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.
- epochs
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
Compute multivariate coherency/coherence
Multivariate decomposition for efficient connectivity analysis