# [Eeglablist] Newtimef parameters - window size and number of cycles

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Thu Nov 26 16:47:00 PST 2015

```Dear Katharina,

> How exactly is the window size computed? In the archives I read a couple
of times, that it should be close to 1000/(lowest frequency) x (number of
cycles). In my example that should lead to a window size of 600 and not
668. Where do those 'extra' 68 ms come from?

I don't know this in detail, but the extra 68 ms must be for adjustments.

> How can I calculate how many cycles were used at specific frequencies? I
have 3 cycles at the lowest and 14 cycles at the highest frequency and I am
getting estimates for 28 frequencies. Does that mean that I get  ~ 0.4
cycles more per frequency step? (3.4 cycles at  5.48 Hz; 3.8 cycles at 6.01
Hz)?

If I use 'cycles', [3 0.85], 'freqs', [3 50], then the smallest number of
cycles is 3 at 3Hz, and the largest number of cycles is something like 50 *
(1-0.85) =  7.5 cycles at 50 Hz.

Makoto

On Mon, Nov 2, 2015 at 7:19 AM, Katharina Limbach <
katharina.limbach at uni-jena.de> wrote:

> Dear all,
>
> I have two questions regarding the description of a time frequency
> analysis using  the newtimef function.
>
> This the is command that I am using:
>
> *[ersp itc powbase times frequencies boot1 boot2 tfdata] = pop_newtimef(
> EEG, 1, chani, [-1460   596], [3  14] , 'baseline',[NaN], 'freqs', [5 60],
> 'plotitc' , 'off', 'plotersp', 'off', 'plotphase', 'off','freqscale',
> 'log', 'scale', 'abs', 'padratio', 1);*
>
> Which leads to the following output in the Command window:
>
> *Computing Event-Related Spectral Perturbation (ERSP) and*
> *  Inter-Trial Phase Coherence (ITC) images based on 1031 trials*
> *  of 514 frames sampled at 250 Hz.*
> *Each trial contains samples from -1460 ms before to*
> *  596 ms after the timelocking event.*
> *  Image frequency direction: normal*
> *Using 3 cycles at lowest frequency to 14 at highest.*
> *Generating 200 time points (-1125.3 to 261.3 ms)*
> *Finding closest points for time variable*
> *Time values for time/freq decomposition is not perfectly uniformly
> distributed*
> *The window size used is 167 samples (668 ms) wide.*
> *Estimating 28 log-spaced frequencies from 5.0 Hz to 60.0 Hz.*
> *Processing time point (of 200): 10 20 30 40 50 60 70 80 90 100 110 120*
> * 130 140 150 160 170 180 190 200*
> *Computing the mean baseline spectrum*
> *Note: Add output variables to command line call in history to*
> *      retrieve results and use the tftopo function to replot them*
>
>
> How exactly is the window size computed? In the archives I read a couple
> of times, that it should be close to 1000/(lowest frequency) x (number of
> cycles). In my example that should lead to a window size of 600 and not
> 668. Where do those 'extra' 68 ms come from?
>
> How can I calculate how many cycles were used at specific frequencies? I
> have 3 cycles at the lowest and 14 cycles at the highest frequency and I am
> getting estimates for 28 frequencies. Does that mean that I get  ~ 0.4
> cycles more per frequency step? (3.4 cycles at  5.48 Hz; 3.8 cycles at 6.01
> Hz)?
>
> Thanks a lot for your help,
> Katharina
>
>
>
>
>
>
> _______________________________________________
> Eeglablist page: http://sccn.ucsd.edu/eeglab/eeglabmail.html
> To unsubscribe, send an empty email to
> eeglablist-unsubscribe at sccn.ucsd.edu
> For digest mode, send an email with the subject "set digest mime" to
> eeglablist-request at sccn.ucsd.edu
>

--
Makoto Miyakoshi
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://sccn.ucsd.edu/pipermail/eeglablist/attachments/20151126/a0383093/attachment.html>
```

More information about the eeglablist mailing list