[Mne_analysis] data format problem when using mne.grand_average

Veda Hung vedahung1116 at gmail.com
Thu Jun 14 04:09:02 EDT 2018
Search archives:

        External Email - Use Caution        

Hello MNE experts,

I tried to aggregate evoked data across subjects and feeded them into
function mne.grand_average. Although I am pretty sure that all elements in
the list are evoked data (see attached photo), it complained about " Not
all input elements are Evoked or AverageTFR".

Here is what I did:

# create place holder
for exp in exps:
            locals()["evoked_"+exp]=[]

# put evoked data from all subjects in the place holder
for exp in exps:
for subj in subjs:
s = mne.read_evokeds("evoked_"+exp+"_"+subj+"-ave.fif")
                locals()["evoked_"+exp].append(s)

# do grand avrage
for exp in exps:
     locals()["group_evoked_"+exp] =
mne.grand_average(locals()["evoked_"+exp],  drop_bads=True)

Can someone pint out what was wrong with code? Thanks

Best,
Veda
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180614/06162418/attachment-0001.html 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: Capture.JPG
Type: image/jpeg
Size: 76728 bytes
Desc: not available
Url : http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20180614/06162418/attachment-0001.jpe 


More information about the Mne_analysis mailing list