Hi all,
I would like to compute a grand average of evoked files.
It seems to work as: grand_ave = np.mean([evoked1.data, evoked2.data,
evoked3.data],1)
However, the problem is that if the evoked data is saved as:
evoked.save("filename-ave.fif")
and loaded as:
evoked = mne.read_evokeds("filename-ave.fif")
evoked doesn't have attribute data.
I also tried:
grand_ave = np.mean([evoked1, evoked2, evoked3],1)
but this gives an error:
TypeError Traceback (most recent call last)
/scratch/braindata/mhhakone/intell/<ipython-input-65-f6e26a212f6a> in
<module>()
----> 1 grand_ave = np.mean([evoked1, evoked2, evoked3],1)
/usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.pyc in mean(a,
axis, dtype, out)
2371 mean = a.mean
2372 except AttributeError:
-> 2373 return _wrapit(a, 'mean', axis, dtype, out)
2374 return mean(axis, dtype, out)
2375
/usr/lib/python2.7/dist-packages/numpy/core/fromnumeric.pyc in _wrapit(obj,
method, *args, **kwds)
35 except AttributeError:
36 wrap = None
---> 37 result = getattr(asarray(obj),method)(*args, **kwds)
38 if wrap:
39 if not isinstance(result, mu.ndarray):
TypeError: unsupported operand type(s) for /: 'Evoked' and 'float'
How can I get data from -ave.fif files? (The -ave.fif files I have saved
seems to open correctly in xFit, Matlab and mne_analyze.)
Or is there some better way to calculate the grand average of -ave.fif
files?
Thanks already in advance!
Regards,
Maria
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20140911/c9272899/attachment.html