Class to generate simulated Source Estimates.
SourceSpaces
Source space.
float
Time step between successive samples in data. Default is 0.001 sec.
float
| None
Time interval during which the simulation takes place in seconds. If None, it is computed using existing events and waveform lengths.
int
First sample from which the simulation takes place, as an integer.
Comparable to the first_samp property of Raw
objects.
Default is 0.
Methods
|
Iterate over 1 second STCs. |
|
Add data to the simulation. |
|
Simulate a SourceEstimate from the provided data. |
|
Get the stim channel from the provided data. |
Add data to the simulation.
Data should be added in the form of a triplet of Label (Where) - Waveform(s) (What) - Event(s) (When)
Label
The label (as created for example by mne.read_label). If the label does not match any sources in the SourceEstimate, a ValueError is raised.
array
, shape (n_times,) or (n_events, n_times) | list
The waveform(s) describing the activity on the label vertices. If list, it must have the same length as events.
array
of int
, shape (n_events, 3)Events associated to the waveform(s) to specify when the activity should occur.
Examples using add_data
:
Simulate raw data using subject anatomy
Generate simulated source data
Duration of the simulation in same units as tstep.
Simulate a SourceEstimate from the provided data.
Returns a SourceEstimate object constructed according to the simulation parameters which should be added through function add_data. If both start_sample and stop_sample are not specified, the entire duration is used.
SourceEstimate
objectThe generated source time courses.
Examples using get_stc
:
Simulate raw data using subject anatomy
Get the stim channel from the provided data.
Returns the stim channel data according to the simulation parameters which should be added through the add_data method. If both start_sample and stop_sample are not specified, the entire duration is used.
Number of time samples in the simulation.
mne.simulation.SourceSimulator
#Simulate raw data using subject anatomy
Generate simulated source data