[FieldTrip] Problem selecting frequency range for source reconstruction using beamforming DICS technique

Stephen Whitmarsh stephen.whitmarsh at gmail.com
Mon Jan 21 13:03:16 CET 2019


Dear Elene,

ft_sourceanalysis only takes a single number (as stated in the help) in
cfg.frequency. If cfg.frquency is empty it will first default to 'all', and
then take the average frequency of the input data (cfg.frequency =
mean(cfg.frequency) %on line 306). This is not clear, and I would suppose
just breaking with an error would have been clearer.

If you want all the frequencies beamformed separately you will have to loop
over frequencies.
If you want all the frequencies beamformed as an average over frequencies
you can average your frequency data first with e.g. ft_selectdata
(cfg.avgoverfreq = 'yes') or, better, do your freqanalysis with some
sleppian smoothing (cfg.taper = 'dpss').

HTH,

Stephen



On Mon, 21 Jan 2019 at 12:35, Elene Beitia Loinaz <
elene.beitia at alumni.mondragon.edu> wrote:

> Dear Fieldtripers,
>
> I am trying to select a time-frequency tile for the performance of the
> Bermforming using DICS recostruction.
>
> First, usng freq analysis I have chosen the time-frequency range I want,
> you can see it in the next code:
>
> cfg              = [];
> cfg.continuous   = 'yes';
> cfg.output       = 'fourier';
> cfg.channel      = 'all';
> cfg.keeptrials   = 'yes';
> cfg.method       = 'mtmfft';
> cfg.taper        = 'hanning';
> cfg.foilim       = [8 12];
> cfg.t_ftimwin     =[160:0.0039063:175];
> data_Fourier      = ft_freqanalysis(cfg, data1);
>
> If I look in the data_Fourier the frequency is define like a range, but
> when I do the beamforming it choses only one frequency (the middle of the
> range), I have not configured anything in cfg.frequency since I want to
> take the full range and not a single number in Hz, but still takes only one
> (in my case 10Hz).
>
> Error:
>  Warning: could not determine dimord of "freq" in:
>
>             label: {128×1 cell}
>              freq: 10.0000
>     fourierspctrm: [1×128 double]
>         cumsumcnt: 94464
>         cumtapcnt: 1
>              elec: [1×1 struct]
>               cfg: [1×1 struct]
>            dimord: 'rpttap_chan_freq'
>
>
> Warning: the selected value 10 should be within the range of the array
> from 10 to 10
>
> Is there anyway to consider all the rage? Is it necessary to set other
> parameters in the cfg of the ft_freqanalysis/ft_sourceanalysis?
>
> Thank you in advanced,
>
> Elene.
>
>
>
> _______________________________________________
> fieldtrip mailing list
> https://mailman.science.ru.nl/mailman/listinfo/fieldtrip
> https://doi.org/10.1371/journal.pcbi.1002202
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20190121/e56e9edb/attachment-0002.html>


More information about the fieldtrip mailing list