<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF"><p><span style="padding: 3px 10px; border-radius: 5px; color: #ffffff; font-weight: bold; display: inline-block; background-color: #ff0000;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;External Email - Use Caution&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span></p><p></p>
<p>Hello everyone;</p>
<p>I am trying to use the topomap plot, but I am having some issues (script below)</p>
<p>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.</p>
<p>the error I get is:</p>
<p>ValueError: Cannot determine location of MEG/EOG/ECG channels using digitization points.<br>
</p>
<p>Any help?</p>
<p>import os.path as op<br>
import numpy as np<br>
import pandas as pd<br>
import matplotlib.pyplot as plt<br>
from scipy.io import loadmat<br>
import mne<br>
<br>
data_path = op.join(&quot;exocos&quot;, &quot;MEG&quot;, &quot;sample&quot;, &quot;s1&quot;)&nbsp; <br>
<br>
fif = data_path &#43; '/run01_sss.fif'<br>
tmin = -.500<br>
<br>
Montage = mne.channels.read_dig_montage(fif=fif)<br>
print(Montage) #here everything looks good<br>
<br>
info = mne.create_info(102, sfreq=500, ch_types='mag', montage=Montage)<br>
print(info) #here I want to select only 102 MAG channel from the list of 339 sensors in the fif file<br>
<br>
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<br>
<br>
#Compute the evoked response<br>
evoked = epochs_S_D_I.average()<br>
evoked.plot(time_unit='s') #this plot <font size="&#43;1">function </font>works fine<br>
<br>
evoked.plot_topomap(ch_type='mag', time_unit='s') #this does not<br>
</p>
<p><br>
</p>
<p><br>
</p>
</body>
</html>