[FieldTrip] Outputting band averages with ft_freqanalysis

Alea Skwara acskwara at ucdavis.edu
Wed May 2 19:35:47 CEST 2018


Hi Arjen,

Thank you, following ft_freqanalysis with ft_selectdata (and using the
.avgoverfreq = 'yes') works.

Alea

On Tue, May 1, 2018 at 7:33 PM, Arjen Stolk <a.stolk8 at gmail.com> wrote:

> 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
>>
>
>
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
>



-- 
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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20180502/a0703e0e/attachment-0002.html>


More information about the fieldtrip mailing list