[FieldTrip] Using cfg.baseline and cfg.toi

Stephen Whitmarsh stephen.whitmarsh at gmail.com
Thu Aug 16 09:13:32 CEST 2018


Hi Eno,

The list will be unable to answer your first question. E.g.: what is your
full cfg, and what is your input/output data structure like? Are the NaNs
already in 'freq'?. Please refer to http://www.fieldtriptoolbox.
org/faq/how_to_ask_good_questions_to_the_community and
http://journals.plos.org/ploscompbiol/article?id=10.
1371/journal.pcbi.1002202 in crafting your questions to this list.

However, if you literally mean 'extract', that you perhaps misunderstand
the functionality of ft_freqbaseline, which is to remove (by division or
subtraction), the baseline from the frequency data. Also, you can try to
follow the tutorials on freqanalysis.

Your second question seems to be a double question:
1) I don't know about the eeglab interface, but if you have trials/epochs,
time is always defined around a particular event, with t=0 more often than
not corresponding to that trial event. At stimulus onset would make sense,
but it has been your decision when segmenting the data. Best is to
backtrack your (eeglab) segmentation and to double-check the .time field of
your fieldtrip data structure, and see if that makes sense to you.

2) All trial-based functions that refer to time/latency, indeed do so
according to the time-axis as specified in the datastructure in the .time
field. However, what that time-axis refers to, (i.e. what t-0 means)
depends on you, as described above.

Hope this helps,
Stephen









On 15 August 2018 at 22:32, Eno Umotong <enoumotong at hotmail.com> wrote:

>
>
>
>
>
>
> Hi there,
>
>
>
> I’m having trouble extracting the baseline from my time frequency data.
>
>
>
> I’m using the function like this:
>
>
>
> cfg = [];
>
> cfg.output = ‘pow’;
>
> cfg.channel = …
>
> cfg.taper = ‘hanning’;
>
> cfg.foi = …
>
> cfg.t_ftimwin = ones(length(cfg.foi),1).*0.5;
>
> cfg.toi = …
>
> cfg.baseline = ..
>
> cfg.baselinetype = ‘absolute’;
>
> cfg.parameter = ‘powspctrm’;
>
> freq = ft_freqanalysis(cfg, Dataset);
>
> TFRHann3 = ft_freqbaseline(cfg,freq);
>
>
>
> How can I use this function correctly please? I’m sorry to bother you with
> this. I couldn’t find assistance online. TFRHann3.powspctrum returns a
> matrix full of NaN. I’m sure this is obvious to you.
>
>
>
> Just one more question. When selecting my time window of interest for
> frequency analysis using ft_freqanalysis and specifying cfg.toi, would 0
> represent my stimulus (as specified by epoch selection in eeglab interface)?
>
>
>
> Many thanks again for your help.
>
>
>
>
>
> Many thanks for your help.
>
>
>
> _______________________________________________
> 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/20180816/93cd97ad/attachment-0002.html>


More information about the fieldtrip mailing list