[Mne_analysis] evoked.plot_topomap help

Alexandre Gramfort alexandre.gramfort at inria.fr
Wed Jan 9 13:11:51 EST 2019
Search archives:

        External Email - Use Caution        

hi Alfredo,

it's possibly a bug or at least a limitation of the create_info when
you say "mag".

can you share a snippet that illustrates the problem using the sample data?

btw why don't you have already the montage in your MEG fif file? it's weird
that you need to load it from a different file.

Alex

On Tue, Jan 8, 2019 at 12:24 PM SPAGNA Alfredo
<alfredo.spagna at icm-institute.org> wrote:
>
>         External Email - Use Caution
>
> Hello everyone;
>
> I am trying to use the topomap plot, but I am having some issues (script below)
>
> I guess the problem is that I am trying to load the sensor location from the initial fif file but then using it as montage info on a .mat file epochs loaded.
>
> the error I get is:
>
> ValueError: Cannot determine location of MEG/EOG/ECG channels using digitization points.
>
> Any help?
>
> import os.path as op
> import numpy as np
> import pandas as pd
> import matplotlib.pyplot as plt
> from scipy.io import loadmat
> import mne
>
> data_path = op.join("exocos", "MEG", "sample", "s1")
>
> fif = data_path + '/run01_sss.fif'
> tmin = -.500
>
> Montage = mne.channels.read_dig_montage(fif=fif)
> print(Montage) #here everything looks good
>
> info = mne.create_info(102, sfreq=500, ch_types='mag', montage=Montage)
> print(info) #here I want to select only 102 MAG channel from the list of 339 sensors in the fif file
>
> epochs_S_D_I = mne.EpochsArray(S_cueD_targetI_Suj1_rej['trial'], info=info, tmin=tmin, baseline=baseline) #here is where I am switching to the .mat structure where I have my epochs
>
> #Compute the evoked response
> evoked = epochs_S_D_I.average()
> evoked.plot(time_unit='s') #this plot function works fine
>
> evoked.plot_topomap(ch_type='mag', time_unit='s') #this does not
>
>
>
> _______________________________________________
> Mne_analysis mailing list
> Mne_analysis at nmr.mgh.harvard.edu
> https://mail.nmr.mgh.harvard.edu/mailman/listinfo/mne_analysis



More information about the Mne_analysis mailing list