Merge a set of events.
array
, shape (n_events_out, 3)The new events.
Notes
Rather than merging events you can use hierarchical event_id in Epochs. For example, here:
>>> event_id = {'auditory/left': 1, 'auditory/right': 2}
And the condition ‘auditory’ would correspond to either 1 or 2.
Examples
Here is quick example of the behavior:
>>> events = [[134, 0, 1], [341, 0, 2], [502, 0, 3]]
>>> merge_events(events, [1, 2], 12, replace_events=True)
array([[134, 0, 12],
[341, 0, 12],
[502, 0, 3]])
>>> merge_events(events, [1, 2], 12, replace_events=False)
array([[134, 0, 1],
[134, 0, 12],
[341, 0, 2],
[341, 0, 12],
[502, 0, 3]])
mne.merge_events
#Regression-based baseline correction