[Mne_analysis] Indexing the nth epoch of a condition

Lyam Bailey Lyam.Bailey at dal.ca
Wed Jun 21 10:14:48 EDT 2017
Search archives:

Dear Eric,


No worries about not being explicit. I actually did implement your suggestion as written below the first time around. So, to be clear,


evokeds[subject] = {cond: epochs[subject][cond][0].average() for cond in conditions}


...only returns a single epoch. Sorry for the miscommunication.

---------------------------------------------------------

Lyam Bailey, BSc.

Graduate Student
Department of Psychology & Neuroscience
Dalhousie University


________________________________
From: mne_analysis-bounces at nmr.mgh.harvard.edu <mne_analysis-bounces at nmr.mgh.harvard.edu> on behalf of Eric Larson <larson.eric.d at gmail.com>
Sent: Wednesday, June 21, 2017 3:06:33 PM
To: Discussion and support forum for the users of MNE Software
Subject: Re: [Mne_analysis] Indexing the nth epoch of a condition


Thanks for your email. Unfortunately this didn't work - it simply returned a single epoch per subject (the first epoch in the dataset, I suspect).

This sounds very close to what you want. I probably should have been more explicit and noted that the code I suggested would need to be looped over conditions (cond), like:

evokeds[subject] = {cond: epochs[subject][cond][0].average() for cond in conditions}


​
HTH,
Eric

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


More information about the Mne_analysis mailing list