[Mne_analysis] [MNE_analysis]

Пилюгина Нина aphina_n at outlook.com
Mon Mar 4 02:55:33 EST 2019
Search archives:

        External Email - Use Caution        

I understand that but how I can average one epoch multiple times?  As I understand from docs, there are no average methods for evoked data.
________________________________
От: mne_analysis-bounces at nmr.mgh.harvard.edu <mne_analysis-bounces at nmr.mgh.harvard.edu> от имени Alexandre Gramfort <alexandre.gramfort at inria.fr>
Отправлено: 4 марта 2019 г. 14:32
Кому: Discussion and support forum for the users of MNE Software
Тема: Re: [Mne_analysis] [MNE_analysis]


        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<mailto: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<mailto: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/3daed608/attachment-0001.html 


More information about the Mne_analysis mailing list