BUG in ft_topoplotER (cfg.xlim) version 20100127

Hanneke Van Dijk Hanneke.vanDijk at MED.UNI-DUESSELDORF.DE
Tue Feb 2 11:16:40 CET 2010


Dear all,

I wanted to report a bug in ft_topoplotER (Fieldtrip version 20100127), regarding the use of cfg.xlim. It doesn't seem to use cfg.xlim when you choose one, but just to use the 'maxmin'. When I average the data over xlim myself I get a completely different topoplot then when I use cfg.xlim for the same range. I wouldn't have known if I didn't need to average over xlim for other reasons.

It seems to happen between lines 445 and 452. The data are selected for cfg.ylim and cfg.component but not for cfg.xlim. This changes the outlook on my data completely, and I think this could be important for all users of this version. Therefore I send it to the entire mailing list.

I have changed it now to:
444 % make dat structure with one value for each channel
445 dat = getsubfield(data, cfg.zparam);
446 if ~isempty(cfg.yparam),
447   dat = dat(:, ymin:ymax, xmin:xmax);
448   dat = nanmean(nanmean(dat, 2), 3);
449 elseif ~isempty(cfg.component) | ~isempty(cfg.xlim);%this part Hanneke added
450  dat = dat(:, xmin:xmax);
451  dat = nanmean(dat, 2);
452 end
453
454 dat = dat(:);

This helps for me and it is very important for me as well, my data looks meaningfull now!

Best and good luck!

Hanneke




--------------------------------------------------
Institut für Klinische Neurowissenschaften und Medizinische Psychologie
Gebäude-Nr.: 23.02
Ebene: 03 Zimmer-Nr.: 47
Tel.:  0211-81-13074
Mail : hanneke.vandijk at med.uni-duesseldorf.de
http://www.uniklinik-duesseldorf.de/deutsch/unternehmen/institute/KlinNeurowiss/Team/HannekevanDijk/page.html


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20100202/381da66b/attachment.html>


More information about the fieldtrip mailing list