[Mne_analysis] Indexing the nth epoch of a condition

Eric Larson larson.eric.d at gmail.com
Wed Jun 21 10:30:36 EDT 2017
Search archives:

No problem, glad it's working!

Eric


On Wed, Jun 21, 2017 at 10:27 AM, Lyam Bailey <Lyam.Bailey at dal.ca> wrote:

> 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
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
>
>
> The information in this e-mail is intended only for the person to whom it
> is
> addressed. If you believe this e-mail was sent to you in error and the
> e-mail
> contains patient information, please contact the Partners Compliance
> HelpLine at
> http://www.partners.org/complianceline . If the e-mail was sent to you in
> error
> but does not contain patient information, please contact the sender and
> properly
> dispose of the e-mail.
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20170621/6fceedfa/attachment-0001.html 


More information about the Mne_analysis mailing list