Back to the main page.

Bug 465 - problem with labels in topoplotIC after pca

Status CLOSED WORKSFORME
Reported 2011-02-01 11:52:00 +0100
Modified 2011-02-16 16:58:53 +0100
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: PC
Operating System: Mac OS
Importance: P1 normal
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Robert Oostenveld - 2011-02-01 11:52:28 +0100

On 1 Feb 2011, at 11:22, Antje Bock wrote: I attented your great last year's Fieldtrip Workshop. Now I am working with MEG data and since I updated the Fieldtrip version (to 20110109) I am experiencing the following problem. I define my layout and call it "lay". Then I do component analyis. When I try to plot the pca components using ft_topoplotIC it gives me the following error message: "labels in data and labels in layout do not match".It worked with the older version, and when I use the ft_componentbrowser it as well works with the lay variable. %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% rot = [ -1 0 0; 0 0 1; 0 1 0]; cfgg.grad.pnt = hdr.orig.MEG.grad.pnt(ch_meg*2,:)*rot; cfgg.grad.ori = hdr.orig.MEG.grad.ori(ch_meg*2,:)*rot; cfgg.grad.tra = hdr.orig.MEG.grad.tra(ch_meg,ch_meg*2); cfgg.grad.label = hdr.orig.MEG.grad.label(ch_meg); grad = cfgg.grad; cfgg.fontsize = 8; cfgg.rotate = [0]; ft_layoutplot(cfgg, dataMytrialfun_data); lay = ft_prepare_layout(cfgg, dataMytrialfun_data); cfgg.layout = lay; cccfg = []; cccfg.method = 'pca'; cccfg.channel = hdr.orig.MEG.grad.label(ch_meg); cccfg.trials = 'all'; cccfg.numcomponent = 'all'; %'all' or number (default = 'all') cccfg.blc = 'no'; %'no' or 'yes' (default = 'yes') [comp] = ft_componentanalysis(cccfg, pca_data); % topoplot of pca components layoutplot(cfgg, comp); cfggg = []; cfggg.component = [1:12]; cfggg.commentpos = 'title'; cfggg.layout = lay; figure; colormap('jet'); ft_topoplotIC(cfggg, comp); % component browser (time courses) cfgggg = []; cfgggg.comp = [1:12]; cfgggg.layout = lay; ft_componentbrowser(cfgggg, comp) %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% It would be great if you have any idea how to solve this problem.


Robert Oostenveld - 2011-02-01 11:53:24 +0100

I suggest to take a small dataset, do componentanalysis with pca on it and then try topoplotIC.


Jan-Mathijs Schoffelen - 2011-02-01 12:00:29 +0100

I suggested to use a recent version of fieldtrip for the testing. I don't think this problem will persist, and is related to a bug reported by Matt Mollison earlier. I asked Antje to check


Jan-Mathijs Schoffelen - 2011-02-02 13:34:06 +0100

Problems have been resolved after updating to recent fieldtrip version