[Mne_analysis] Indexing the nth epoch of a condition

Lyam Bailey Lyam.Bailey at dal.ca
Wed Jun 21 10:27:56 EDT 2017
Search archives:

Dear Eric,


Many apologies...please disregard my last email. It seems that I was misreading my output - your suggestion DID indeed work. In answer to your question, by 'returns' I was referring to which epochs were being selected for averaging. So epochs[subject][cond][0] selected/returned the first instance of each condition, as intended.


Thanks very much for the help, and again, sorry for the miscommunication.

Kind regards

Lyam


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

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:20:30 PM
To: Discussion and support forum for the users of MNE Software
Subject: Re: [Mne_analysis] Indexing the nth epoch of a condition


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


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

Can you be a bit clearer about what you mean by "returns"? Which variables are what length? For example, if evokeds[subject] is a length-1 dictionary (what I think you're saying), this is only possible if `conditions` is itself also length 1. But every entry in the `evokeds[subject]` dict should be an Evoked instance with `nave==1`, namely the first (valid) epoch from that condition, which is what I think you're trying to get.

Eric

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


More information about the Mne_analysis mailing list