[Mne_analysis] merge/combine events MNE Python

Lucy MacGregor Lucy.MacGregor at mrc-cbu.cam.ac.uk
Thu Feb 18 04:27:20 EST 2016
Search archives:

Dear MNE Python users,


I would like to combine event codes to create a number of new events whilst retaining the originals. E.g.,

CondA = 11
CondB = 12
CondC = 13
CondD = 14
CondE = 11,12
CondF = 13,14


Is there a straightforward way to do this? I have seen this thread

https://mail.nmr.mgh.harvard.edu/pipermail//mne_analysis/2013-April/001498.html<https://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/2013-April/001498.html>


Using mne.event.merge_events works fine when I was just creating one new event (as does the alternative method of combining events at the evoked stage) but I'm unsure of the most sensible way to proceed given I want to create multiple new events. I originally did this:

events=mne.event.merge_events(events, [11,12], 1112, replace_events=False)
events=mne.event.merge_events(events, [13,14], 1314 replace_events=False)

but then, because I'm not replacing events, I end up with multiple copies of all events (even those not included in the merge_events function)  at a given sample point, which isn't ideal.

As a new MNE Python user (I previously used MNE) I would be grateful for any advice as the best way to do this.


Thank you,

Lucy MacGregor


******************************************************************
Lucy MacGregor
MRC Cognition and Brain Sciences Unit
15 Chaucer Road
Cambridge CB2 7EF
Tel: 01223 355294 Ext 860
http://www.mrc-cbu.cam.ac.uk/people/lucy.macgregor/


This e-mail may have a protective marking.  For an explanation please see
http://www.mrc.ac.uk/About/Informationandstandards/Documentmarking/index.htm

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20160218/f036e4a2/attachment.html 


More information about the Mne_analysis mailing list