[FieldTrip] Outputting average power with ft_freqanalysis
Schoffelen, J.M. (Jan Mathijs)
jan.schoffelen at donders.ru.nl
Thu Oct 6 16:35:39 CEST 2016
Dear Lizzie,
You haven’t done anything wrong, and the output is exactly as expected. You almost solved it yourself, since indeed you would want to need the option cfg.avgoverfreq = ‘yes’, but this should be invoked in another function:
cfg = [];
cfg.avgoverfreq = ‘yes’;
FFThann = ft_freqanalysis(cfg, FFThann);
Best wishes,
Jan-Mathijs
On 06 Oct 2016, at 16:03, Shephard, Elizabeth <elizabeth.1.shephard at kcl.ac.uk<mailto:elizabeth.1.shephard at kcl.ac.uk>> wrote:
Dear all
I am fairly new to FieldTrip so apologies if this is a very basic question...
I am using ft_freqanalysis and wanted to obtain average power values in frequency bands rather than power values at particular frequencies. So, following the documentation online, I specified the following:
cfg = [];
cfg.method = 'mtmfft';
cfg.taper = 'hanning';
cfg.foilim = [1 3]; % get power in delta range
cfg.keeptrials = 'yes';
cfg.output = 'pow';
FFThann = ft_freqanalysis(cfg, data);
But the powspctrm field I get in FFThann gives power values for 0.5 Hz steps across the 1-3 Hz range, rather than a single average power value for the 1-3 Hz range.
I was wondering if I have specified something incorrectly? I've also tried adding "cfg.avgoverfreq = 'yes';" but this doesn't change the output.
Many thanks in advance
Lizzie
---------------------------------------------------------------------------
Lizzie Shephard, PhD
Postdoctoral researcher
2.21 MRC SGDP Centre
Institute of Psychiatry, Psychology, & Neuroscience
King’s College London
De Crespigny Park
London, SE5 8AF
0207 848 5272
elizabeth.1.shephard at kcl.ac.uk<mailto:elizabeth.1.shephard at kcl.ac.uk>
_______________________________________________
fieldtrip mailing list
fieldtrip at donders.ru.nl<mailto:fieldtrip at donders.ru.nl>
https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20161006/4493e506/attachment-0002.html>
More information about the fieldtrip
mailing list