Back to the main page.

Bug 43 - small bug using ft_topoplotER with combined EEG+MEG

Status CLOSED FIXED
Reported 2010-03-03 10:51:00 +0100
Modified 2010-05-12 17:26:07 +0200
Product: FieldTrip
Component: core
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P5 normal
Assigned to: Roemer van der Meij
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2010-03-03 10:51:39 +0100

2010/3/2 Lucie Charles <lucie.charles.ens@googlemail.com> Hi everyone , I noticed a small bug using ft_topoplotER with my EEG-MEG data that I think I managed to correct. When I try to use the option : cfg.highlight = ' labels ' or cfg.marker = ' labels ' I have an error message saying that it doesn't find coordinates for some labels (see at the end for the entire message). I looked into it and it seems that EEG channels are always in the list of channels that the function tries to plot even if I'm trying to plot only magnetometers for example. I made two small changes at the ft_topoplotER and it seems to solve the problem : line 606 > templay.label = data.label(labelindex); instead of templay.label = channelselection(cfg.highlightchannel{icell}, data.label); line 631 > templay.label = data.label(labelindex); instead of templay.label = channelselection(setdiff(1:length(data.label),highlightchansel), data.label); This solution works fine for me but I'm not sure that it will work in any case. Still I hope it helps. Cheers, Lucie CHARLES, Unicog Neuroimaging Unit, Neurospin, Gif/Yvette, FRANCE Error Message : ??? Error using ==> text Each string specified must have a corresponding set of coordinates Error in ==> plot_lay at 73 text(X+labeloffset, Y+(labeloffset*1.5), Lbl,'fontsize',labelsize); Error in ==> ft_topoplotER at 617 plot_lay(templay,'box','no','label',labelflg,'point','yes',... Error in ==> topoplotER at 17 [varargout{1:nargout}] = funhandle(varargin{:});


Roemer van der Meij - 2010-04-15 17:31:05 +0200

Hi Lucie, Thanks a lot for your bug report. It should now be fixed (it would be great if you could check it) in the latest version, which will be on the ftp-server tonight. However, it should not be: data.label(labelindex) But: lay.label(labelindex) This is because data.label does not necessarily (but it does often) match lay.label, as some channels are often thrown out in the analysis-pipeline (e.g. EMG channels), but they remain in lay.label. Kind regards, Roemer