Plotting topographies for MEG sensors

I am trying to plot meg evoked data using vector-view layouts but keep
getting the error message that the .lout files cannot be found when I call
this line

layout = Layout('Vectorview-all')

Any obvious reasons why I might be having trouble?

Many thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.nmr.mgh.harvard.edu/pipermail/mne_analysis/attachments/20121101/b39d60d7/attachment.html

hi Diana,

I am trying to plot meg evoked data using vector-view layouts but keep
getting the error message that the .lout files cannot be found when I call
this line

layout = Layout('Vectorview-all')

you should be able to specify the path to Vectorview-all.lout

layout = Layout('Vectorview-all', path='/path/to/')

FYI in the new version it will be written:

layout = read_layout('Vectorview-all', path='/path/to/')

Best,
Alex

Thanks both, unfortunately Im now getting the black image box with my title
but no actual plots when I use the plot_topo function even though I can see
the evoked object when I use plot_evoked.

Diana

Hi Diana,

could you share the script you were using?
Did you make sure that you were using the correct layout. In case your MEG-system isn't a Neuromag 'vectorview-all' will not work. The plotting function assumes that channel names of raw match the layout names.
So you could compare raw.ch_names with layout.names.

Hope this helps.

Denis

Thanks,
I'm using neuromag. Comparing the evoked/raw channel names with layout
names, I notice there is a space in the latter that isn't there in the
former

MEG 0113
vs
MEG0113

Diana

p.s.
my script below

#mne
#export PATH=/home/do232950/MyPython/epd_free-7.2-2-rh5-x86_64/bin:$PATH
#export PYTHONPATH=/home/do232950/MyPython/mne-python:$PYTHONPATH
print __doc__
#ipython
import os

import mne
import pylab as pl
import numpy as np
from mne import fiff
from mne.layouts import Layout
from mne.viz import plot_evoked,plot_topo
#conditions = ['Pa_Ac','Vav','A']
conditions = ['A']

#evoked=dict()
#subj_id = ['s02']
subj_id =
['s01','s02','s04','s05','s06','s07','s09','s10','s11','s12','s13','s14','s16','s17']

for s, subj in enumerate(subj_id):
data_ave_path = 'Desktop/ave/'
for i, cond in enumerate(conditions):
  fname= data_ave_path + subj + '/'+subj +'_'+ cond +'_ave.fif'
  evoked= fiff.read_evoked(fname, setno=0, baseline=(None, 0))
  layout=Layout('Vectorview-all',path='Desktop')
plot_topo(evoked, layout)
title="mne"
pl.figtext(0.03,0.93,title,color='w',fontsize=18)
pl.show()

hi Diana,

can you confirm that this example renders properly on your machine?

http://martinos.org/mne/auto_examples/plot_topography.html#example-plot-topography-py

if yes, please send me the evoked fif file so I can investigate.

Best,
Alex

Hi Alex

I seemed to have a version of the layout function that generated names
which didn't have the white space between MEG and the sensor number e.e.
MEG0113 instead of MEG 0113
It works fine when, as advised, I change the layout channel names to be the
same as my evoked/ raw file
layout.names = raw.ch_names[:len(layout.names)]

Diana

Hi Diana,

this is rather a hack for short-term satisfaction.
On the long, run you will save trouble if you make sure the versions you
installed aren't mutually interfering.
(It's kind of weird that you need the new layout syntax but get wrong /
outdated names)
Would be good to see whether the example Alex pointed out runs on your
machine with your setup.
You might want to consider making a new clean installation (current release
0.40 OR the dev branch).

Best,
Denis

Hi Diana and Alex,

One thing I like to clear there is difference between new electronics and
old electronics of Elekta system, New system do not have space between MEG
and the channel identifier, but old system have space.

Alex, after MEG upgrade Martinos center MEG do not have space anymore.

Sheraz

Thanks Sheraz

That's indeed good to know. Thanks to all of you for reporting and commenting. Meanwhile we've included a patch that makes the topography plotting functions smart enough to deal with these existing differences. It is available in the current developmental branch and will be part of the forthcoming mne-python release.

Denis