[FieldTrip] Outputting band averages with ft_freqanalysis

Arjen Stolk a.stolk8 at gmail.com
Wed May 2 04:33:05 CEST 2018


Hi Alea,

Have a look at ft_selectdata, which can do this operation for you.

Arjen


On Tue, May 1, 2018 at 7:05 PM, Alea Skwara <acskwara at ucdavis.edu> wrote:

> Hi All,
>
> I am attempting to output averages within frequency bands using
> ft_freqanalysis. I have implemented the two-step solution provided in this
> discussion https://mailman.science.ru.nl/pipermail/
> fieldtrip/2016-October/010984.html
> resulting in the following code:
>
>   cfg =[];
>   cfg.method = 'mtmfft';
>   cfg.output = 'pow';
>   cfg.taper = 'hanning';
>   cfg.channel = 'all';
>   cfg.foilim = [fio1 foi2];
>   cfg.trials = 'all';
>   cfg.keeptrials = 'no';
>   freq_avg = ft_freqanalysis(cfg, data_segmented);
>
>   cfg = [];
>   cfg.avgoverfreq = 'yes';
>   freq_avg = ft_freqanalysis(cfg, freq_avg);
>
> However, when I run this, I get the following error:
>
> the input is freq data with 73 channels, 41 frequencybins and no timebins
> Error using ft_checkdata>freq2raw (line 1315)
> not supported for dimord chan_freq
>
> Error in ft_checkdata (line 432)
>       data = freq2raw(data);
>
> Error in ft_freqanalysis (line 217)
> data = ft_checkdata(data, 'datatype', {'raw', 'raw+comp', 'mvar'},
> 'feedback', cfg.feedback, 'hassampleinfo', 'yes');
>
>
> Is there a different way I need to format my data beyond providing the
> function with the output of the first iteration of ft_freqanalysis?
>
> Thank you!
> Alea
>
> --
> Alea C. Skwara, M.A.
> PhD Candidate | Saron Lab
> http://saronlab.ucdavis.edu/
>
> Center for Mind and Brain | University of California, Davis
> 267 Cousteau Place | Davis CA 95616
> Cell: (828) 273-8595
>
>
>
> _______________________________________________
> fieldtrip mailing list
> 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/20180501/67f43a04/attachment-0002.html>


More information about the fieldtrip mailing list