Back to the main page.

Bug 230 - ft_singleplotTFR doesnt handle chansel correctly with cohspctrm data

Status CLOSED FIXED
Reported 2010-11-23 22:08:00 +0100
Modified 2011-01-26 15:38:37 +0100
Product: FieldTrip
Component: plotting
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P1 major
Assigned to: Saskia Haegens
URL:
Tags:
Depends on:
Blocks:
See also:

Saskia Haegens - 2010-11-23 22:08:20 +0100

current version (20101122) line 172: if ~isfull, % only works explicitly with coherence FIXME % Convert 2-dimensional channel matrix to a single dimension: sel1 = strmatch(cfg.cohrefchannel, data.labelcmb(:,2)); sel2 = strmatch(cfg.cohrefchannel, data.labelcmb(:,1)); fprintf('selected %d channels for coherence\n', length(sel1)+length(sel2)); data.cohspctrm = data.cohspctrm([sel1;sel2],:,:); data.label = [data.labelcmb(sel1,1);data.labelcmb(sel2,2)]; data.labelcmb = data.labelcmb([sel1;sel2],:); data = rmfield(data, 'labelcmb'); here the requested channels are selected, the data now only contains those channels, but later it tries to average over the original chansel (i.e. refering to the original trial numbers), line 251: % Get TFR data averaged across selected channels, within the selected x/y-range: if ~isfull dat = getsubfield(data, cfg.zparam); TFR = squeeze(mean(dat(chansel,yidc,xidc), 1)); obviously this is not possible.. as chansel refers to the original channel numbers and these have been removed. it used to work fine with previous versions, dont know when this problem was introduced.


Saskia Haegens - 2010-11-23 23:11:27 +0100

i fixed it, i hope ;) seemed to be matter of moving the channel selection to after dealing with cohspctrm


Jan-Mathijs Schoffelen - 2010-11-24 08:50:06 +0100

See bug 180. I think this behaviour has not changed; I recently updated topoplotER to make the code more transparent. relevant parts of this code should be built into the respective multi and single plotting functions. Please use the code from topoplotER if you start fixing stuff.


Robert Oostenveld - 2011-01-26 15:37:17 +0100

I closed all bugs that were resolved prior and including 2011-01-25. All resolved bugs should have been discussed by now, therefore we don't want to see them again in the next meeting. Instead, in the next meeting we want to see the recent improvements and fixes.


Robert Oostenveld - 2011-01-26 15:38:37 +0100

I closed all bugs that were resolved prior and including 2011-01-25. All resolved bugs should have been discussed by now, therefore we don't want to see them again in the next meeting. Instead, in the next meeting we want to see the recent improvements and fixes.