[Mne_analysis] need help to plot EEG topomaps with mne
JR KING
jeanremi.king at gmail.com
Mon Jun 20 04:13:43 EDT 2016
Hi Mathieu,
to complete Jaakko's answer, you can plot 3D EEG projection using mne.viz
import.evoked_field. For example:
```
import os.path as op
import mne
from mne.forward import make_field_map
from mne.viz import plot_evoked_field
# get data
data_path = mne.datasets.sample.data_path()
subjects_dir = data_path + '/subjects'
trans_fname = op.join(data_path, 'MEG', 'sample',
'sample_audvis_raw-trans.fif')
fname = op.join(data_path, 'MEG', 'sample', 'sample_audvis-ave.fif')
evoked = mne.read_evokeds(fname, baseline=(None, 0), proj=True)[0]
# select eeg channels only
evoked.pick_types(eeg=True, meg=False)
# plot field maps
maps = make_field_map(evoked, trans=trans_fname, subjects_dir=subjects_dir,
subject='sample', n_jobs=-1, meg_surf='head')
plot_evoked_field(evoked, maps, time=.1)
```
Hope that helps,
Jean-Rémi
On 20 June 2016 at 09:00, Jaakko Leppäkangas <jaeilepp at student.jyu.fi>
wrote:
> Hi Mathieu,
> currently there is no way to project to 3d.
>
> For the second point you could use a montage when reading the data. The
> readers for EEG data have a montage parameter that you could use to set the
> channel locations (see for example
> http://mne-tools.github.io/dev/generated/mne.io.read_raw_edf.html#mne.io.read_raw_edf
> and
> http://mne-tools.github.io/dev/generated/mne.channels.read_montage.html#mne.channels.read_montage).
> In your case, since you have some custom locations, one option would be to
> manually add entries for 'OL' and 'OR' to the standard_1020.elc file, if
> you know their locations.
>
> -Jaakko
>
> On 18 June 2016 at 20:56, Servant Mathieu <servant.mathieu at gmail.com>
> wrote:
>
>> I'm new to mne, and would like to compute some topographic voltage maps
>> from my EEG grand-averaged data.
>>
>> I have two specific questions:
>> (i) The plot_topomap function plots 2D maps. Is there a way to plot 3D
>> maps?
>> (ii) My data_ is a 19 (electrodes) x 300 (datapoints) numpy array.
>> Sampling rate was 250 Hz, and the 300 datapoints correspond to a -200 1000
>> ms epoch (0 being the stimulus-locking event).
>> -Is there a simple way to plot topographies at say, 300 ms after stimulus
>> onset, or topographies over the average of a given time window (300-500ms
>> after stimulus onset)?
>> -I need to provide the (x,y) coordinates for each EEG channel. My
>> channels are:
>> electrodes =
>> ['F3','F4','C3','C4','P3','P4','PO3','PO4','O1','O2','OL','OR','T3','T4','T5','T6','Fz','Cz','Pz']
>> These electrodes are standard international 10/20 System sites, except OL
>> (halfway between 01 and T5) and OL (halfway between 02 and T6). Given these
>> locations, which coordinate array should I provide to the plot_topomap
>> function ?
>>
>> Thanks for your help!
>> Mathieu
>>
>>
>> _______________________________________________
>> 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.
>>
>>
>
> _______________________________________________
> 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/20160620/27ab5789/attachment.html
More information about the Mne_analysis
mailing list