[FieldTrip] Fwd: ft_selectdata

jan-mathijs schoffelen jan.schoffelen at donders.ru.nl
Tue Apr 12 15:38:24 CEST 2011


Dear Mark,

I forward your message to the list in order for other people to also  
benefit from it (regarding your question: at least those who can read  
Dutch: ;o) ).
Your question relates to an error you get, when calling ft_selectdata  
using a variable 'Data', which I assume to be the output of  
ft_timelockgrandaverage.
Moreover, I assume you are using a not up-to-date version of  
FieldTrip, because your variable 'Data' contains both and .avg-field,  
and in .individual-field.
This makes the data-object ambiguous with respect to the 'dimord'; for  
the .individual-field the 'dimord' should be 'subj_chan_time', and for  
the .avg-field the 'dimord' should be 'chan_time'.

This is why we recently changed ft_timelockgrandaverage to only output  
the .individual-field, if cfg.keepindividual = 'yes';

Moreover, we recently fixed a small bug related to ft_selectdata not  
being able to correctly deal with the 'dimord'-string 'subj'.

In other words, could you please update to a recent version of  
FieldTrip and try again?

Best wishes,

Jan-Mathijs


Begin forwarded message:

> From: Mark Noordenbos <m.noordenbos at bsi.ru.nl>
> Date: April 12, 2011 10:37:05 AM GMT+02:00
> To: j.schoffelen at donders.ru.nl
> Subject: !!!!!SPAM!!!!! ft_selectdata
>
> Beste Jan-Mathijs,
>
> Momenteel gebruik ik Fieldtrip voor het analyseren van timelocked  
> EEG data. Nu wil ik op basis van cluster analyse kijken of er een  
> verschil tussen de linker en rechter hemisfeer, maar volgens mij zit  
> deze optie helaas alleen in ft_sourcestatistics. Daarom probeer ik  
> met ft_selectdata de data te selecteren voor de linker en rechter  
> hemisfeer op basis van channels. Daarna heb ik de labels in de ene  
> dataset aangepast omdat er anders geen channels worden gevonden die  
> overeenkomen.
>
> chan_left = {'F7','F3', 'FC5','FC1','T7','C3','CP1','P7','P3','O1'};
> chan_right = {'F8','F4', 'FC6','FC2','T8','C4','CP2','P8','P4','O2'};
> Data_left = ft_selectdata(Data, 'channel', chan_left);
> Data_right = ft_selectdata(Data, 'channel', chan_right);
> Data_right.label= {'F3','F7','FC1','FC5','C3','CP1','P3','P7','O2'};
>
> Maar met ft_selectdata krijg ik steeds de volgende foutmelding:
>
> ??? Attempted to access n(1); index out of bounds because numel(n)=0.
>
> Error in ==> dimlength at 115
>         if ~all(n==n(1))
>
> Error in ==> dimlength at 46
>       n{k}(i) = dimlength(data, dimtok{i}, fn{k});
>
> Error in ==> seloverdim at 39
> [reduceddim, fntmp] = dimlength(data);
>
> Error in ==> ft_selectdata at 562
>   if selectrpt,  data = seloverdim(data, 'rpt',  selrpt,  fb); end
>
>
> Kan het kloppen dat ft_selectdata niet overweg kan met  
> Data.individuals want als ik dit verwijder en Data.dimord verander  
> in chan_time dan werkt ft_selectdata wel.
>
> Data bestaat uit:
>
> label: {30x1 cell}
>        fsample: 500
>            avg: [30x350 double]
>            var: [30x350 double]
>           time: [1x350 double]
>     individual: [31x30x350 double]
>         dimord: 'subj_chan_time'
>            cfg: [1x1 struct]
>
>
>
> Wellicht doe ik iets verkeerd of is er misschien een andere (betere)  
> methode voor het vergelijken van hemisferen voor timelocked EEG data.
>
> Alvast bedankt,
> Mark Noordenbos
>
> -- 
> Mark Noordenbos, MSc
>
> Radboud University Nijmegen
> Behavioural Science Institute
>
> P.O. Box 9104, Room A05.36
> 6500 HE Nijmegen
> The Netherlands
>
> Email: m.noordenbos at bsi.ru.nl
> Telephone: +31 24 3612070
> Fax:          +31 24 3616211
>
> http://www.ru.nl

Dr. J.M. (Jan-Mathijs) Schoffelen
Donders Institute for Brain, Cognition and Behaviour,
Centre for Cognitive Neuroimaging,
Radboud University Nijmegen, The Netherlands
J.Schoffelen at donders.ru.nl
Telephone: 0031-24-3614793

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20110412/b5a9a83b/attachment-0001.html>


More information about the fieldtrip mailing list