[FieldTrip] Fwd: ft_freqdescriptives and cfg.trial
Jasper Poort
poortjasper at gmail.com
Thu Aug 23 12:34:48 CEST 2012
Dear Fieldtrip users,
I have a problem with using a trial selection to do freqdescriptives on a
subset of trials:
I first do ft_freqanalysis with these setttings, which results in freq:
cfg.output = 'fourier';
cfg.method = 'mtmconvol';
cfg.keeptrials = 'yes';
freq =
label: {1x64 cell}
dimord: 'rpttap_chan_freq_time'
freq: [30 35 40 45 50 55 60 65 70 75 80 85 90 95 100]
time: [1x36 double]
fourierspctrm: [4-D double]
cumtapcnt: [857x15 double]
cfg: [1x1 struct]
size(freq.fourierspctrm)
ans =
2571 64 15 36
then i try running ft_freqdescriptives with these settings
tmpcfg = [];
tmpcfg.jackknife = 'no';
tmpcfg.keeptrials = 'no';
tmpcfg.channel = freq.label([chnix1,chnix2])
tmpcfg.trials = [1:10:100];
tmp = ft_freqdescriptives(tmpcfg,freq);
Error using +
Array dimensions must match for binary array op.
Error in ft_checkdata>fixcsd (line 740)
powspctrm = powspctrm +
abs(data.fourierspctrm(p:ntap:end,:,:,:,:)).^2;
Error in ft_checkdata (line 646)
data = fixcsd(data, cmbrepresentation, channelcmb);
Error in ft_freqdescriptives (line 131)
freq = ft_checkdata(freq, 'cmbrepresentation', 'sparsewithpow',
'channelcmb', {});
the error seems to happen because the cumtapcnt seems to be updated after
calling ft_selectdata in ft_freqdescriptives such that it no longer
contains a row for every trial which causes nrpt = size(data.cumtapcnt,1);
in ft_checkdata to return 1 instead of the number of trials.
label: {2x1 cell}
dimord: 'rpttap_chan_freq_time'
freq: [30 35 40 45 50 55 60 65 70 75 80 85 90 95 100]
time: [1x36 double]
fourierspctrm: [4-D double]
cumtapcnt: [3 3 3 3 3 3 3 3 3 3]
cfg: [1x1 struct]
I was wondering if this is a bug or am I somehow specifying the input
incorrectly?
Thanks! best, Jasper
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120823/37cbfd78/attachment-0001.html>
More information about the fieldtrip
mailing list