[Mne_analysis] [MNE_analysis]

Alexandre Gramfort alexandre.gramfort at inria.fr
Mon Mar 4 02:32:03 EST 2019
Search archives:

        External Email - Use Caution        

evokeds is a list so doing:

evokeds[trial_type].average()  ## will break

epochs[trial_type].average()  ## work

A

On Mon, Mar 4, 2019 at 5:06 AM Пилюгина Нина <Aphina_N at outlook.com> wrote:

>         External Email - Use Caution
>
> Hello
> My aim is to get 100 averaged epochs of MEG data with saving information
> on each condition. I tried to use epochs average, but maybe my approach or
> my code isn't correct. My code:
> evokeds = []
> for trial_type in epochs.event_id:
>     evokeds.append(epochs[trial_type].average())
>     evokeds.append(evokeds[trial_type].average())
>
> And after that I get an error:
> evokeds.append(evokeds[trial_type].average())
> TypeError: list indices must be integers or slices, not str
>
> If I use just epochs averaging
> = []
> for trial_type in epochs.event_id:
>     evokeds.append(epochs[trial_type].average())
>
> Works fine.
>
> I understand that presented examples didn't use these multiple averaging,
> but I need for comparing with other data which used this 100 times
> averaging.
>
> Looking forward for your replay
>
> Best regards,
> Nina
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20190304/dff91dc0/attachment.html 


More information about the Mne_analysis mailing list