[Mne_analysis] plotting topograph issue with channel type

Denis-Alexander Engemann denis.engemann at gmail.com
Mon Nov 25 11:38:31 EST 2013
Search archives:

Dear Jennifer,

from the traceback I can see that you must be using the current stable
version of MNE-Python (0.6) or an older development version.
We meanwhile refactored the layout and channels handling in our plotting
functions.
Before starting to inquire, it would be good to know whether this problem
also occurs with the most recent development version
(for instructions, see README.rst here
https://github.com/mne-tools/mne-python).
Btw. we will release the new stable version 0.7 very soon.

Cheers,
Denis



On Mon, Nov 25, 2013 at 5:28 PM, Jennifer Evans <jennifer.evans at nih.gov>wrote:

>
> 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'
>
> _______________________________________________
> 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/20131125/cf8aa1e4/attachment.html 


More information about the Mne_analysis mailing list