Question on Freqanalysis_tfr
Paco Diaz
pacodiaz at UB.EDU
Mon Feb 16 15:58:57 CET 2009
Dear fieldtrip users,
While reading carefully what the function freqanalysis_tfr do, I have
found something that seems very extrange to me. I think that the general
procedure for the wavelet transformation is clear but I can't get why do you
multiply by 2, and divide by the sampling rate, the absolute value of the
convolution.
I have still used the function with very good results, but I would like to
understand that step in order to sleep well.
Here is a piece of the code:
for k=1:size(dat,1)
for j=1:length(cfg.foi)
cTmp = conv(dat(k,:),M{j});
cTmp = (2*abs(cTmp)/data.fsample).^2;
cTmp = cTmp(ceil(length(M{j})/2):length(cTmp)-floor(length(M{j})/2));
cTmp = cTmp(:,1:cfg.downsample:end);
if strcmp(cfg.keeptrials, 'yes')
freq.powspctrm(i,k,j,:) = cTmp';
else
freq.powspctrm(k,j,:) = squeeze(freq.powspctrm(k,j,:)) + cTmp'; %
compute the running sum
end
end
end
Thank you very much in advance, Paco.
----------------------------------
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/fcdonders/fieldtrip.
More information about the fieldtrip
mailing list