[FieldTrip] Outputting average power with ft_freqanalysis
Shephard, Elizabeth
elizabeth.1.shephard at kcl.ac.uk
Thu Oct 6 16:51:45 CEST 2016
Dear Jan-Mathijs
Brilliant, thanks for getting back to me. I have it working now with the second step :)
Many thanks
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
________________________________
From: fieldtrip-bounces at science.ru.nl <fieldtrip-bounces at science.ru.nl> on behalf of Schoffelen, J.M. (Jan Mathijs) <jan.schoffelen at donders.ru.nl>
Sent: 06 October 2016 15:35:39
To: FieldTrip discussion list
Subject: Re: [FieldTrip] Outputting average power with ft_freqanalysis
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<https://emea01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fmailman.science.ru.nl%2Fmailman%2Flistinfo%2Ffieldtrip&data=01%7C01%7Celizabeth.1.shephard%40kcl.ac.uk%7C1d5e0f9490b34b409d7408d3edf6c1f5%7C8370cf1416f34c16b83c724071654356%7C0&sdata=PeHMgkyNK%2Fopljut3%2FryAVyAYZ%2ByRX1T9CVnihmLqlI%3D&reserved=0>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20161006/e1c52745/attachment-0001.html>
More information about the fieldtrip
mailing list