[Mne_analysis] plotting topograph issue with channel type

Jennifer Evans jennifer.evans at nih.gov
Mon Nov 25 11:28:38 EST 2013
Search archives:

Hi,

The sample data works fine for plotting topographs, and I was trying to 
reproduce something similar with my data but I keep getting 'channel 
type eeg does not exist'.  The 'kind' = 2 in the raw.info listing so I 
figure the data is identified correctly as eeg in the program...  I 
can't quite figure out what the problem is, maybe the fact that there 
are no channel locations?  Any help would be greatly appreciated. The 
code and the error follow.

Thanks,
Jen

----------The code:

# get data
fn = sys.argv[1]
raw = mne.fiff.Raw(fn)

#get events
events = mne.find_events(raw,'STI 014')

event_id = 10  # event trigger and conditions
tmin = -0.2  # start of each epoch (200ms before the trigger)
tmax = 0.1  # end of each epoch (500ms after the trigger)

picks = mne.fiff.pick_types(raw.info, meg=False, eeg=True, exclude='bads')

baseline = (None, 0)  # means from the first instant to t = 0

epochs = mne.Epochs(raw, events, event_id, tmin, tmax, proj=True, 
picks=picks, baseline=baseline, preload=False)

print epochs['10']

evoked = epochs[10].average()

evoked.plot_topomap(0.1, ch_type='eeg', size=3, colorbar=False)





-------- The error:
---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
/usr/lib/python2.7/dist-packages/IPython/utils/py3compat.pyc in 
execfile(fname, *where)
     173             else:
     174                 filename = fname
--> 175             __builtin__.execfile(filename, *where)

/data2/ME-mtr/data/20ch/scripts/do_topo.py in <module>()
      31 evoked = epochs[10].average()
      32
---> 33 evoked.plot_topomap(0.1, ch_type='eeg', size=3, colorbar=False)

/usr/local/lib/python2.7/dist-packages/mne/fiff/evoked.pyc in 
plot_topomap(self, times, ch_type, layout, vmax, cmap, sensors, 
colorbar, scale, unit, res, size, format, proj, show)
     449                             vmax=vmax, cmap=cmap, sensors=sensors,
     450                             colorbar=colorbar, scale=scale, 
unit=unit, res=res,
--> 451                             proj=proj, size=size, format=format)
     452
     453     def to_nitime(self, picks=None):

/usr/local/lib/python2.7/dist-packages/mne/viz.pyc in 
plot_evoked_topomap(evoked, times, ch_type, layout, vmax, cmap, sensors, 
colorbar, scale, unit, res, size, format, proj, show)
     850         picks = pick_types(info, meg=ch_type, exclude='bads')
     851         if len(picks) == 0:
--> 852             raise ValueError("No channels of type %r" % ch_type)
     853
     854         if layout is None:

ValueError: No channels of type 'eeg'
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20131125/95a490c0/attachment.html 


More information about the Mne_analysis mailing list