eelbrain.pipeline.MneExperiment.fix_events
- MneExperiment.fix_events(ds)
Modify event order or timing
- Parameters:
ds (Dataset) – A Dataset containing events (with variables as returned by
load.mne.events()
).- Returns:
ds – Should return the modified events dataset. Needs to contain at least the
i_start
andtrigger
columns.- Return type:
See also
label_events
Add event labels
Notes
Override this method in subclasses to change the event structure or timing. This method is called before adding other variables.
The subject and session the events are from can be determined with
ds.info['subject']
andds.info['session']
.Calling the original (super-class) method is not necessary.
Examples
Drop the last event from subject
S01
:class Experiment(MneExperiment): def fix_events(self, ds): if ds.info['subject'] == 'S01': return ds[:-1] else: return ds