[Eeglablist] How to use timefreq() ??

Arnaud Delorme arno at ucsd.edu
Mon Sep 21 22:46:28 PDT 2009


Dear Edward,

timefreq() is a function to compute time-frequency decompositions. It  
is called both by the newtimef and newcrossf functions (and other time- 
frequency functions).
timefreq() is usually not called directly unless you want to obtain  
the complex time-frequency estimates.

> 1)	When I attempt to call this function I get memory issues;
>
>>> 	timefreq(EEG.data, 250,'cycles', 7, 'wletmethod', 'dftfilt3',
> 'tlimits', [-200 1000],  'padratio', 2 );


If you call newtimef, there is an option to compute the time-frequency  
decomposition frequency by frequency ('lowmem' option).


> 2)	There appears to be no input in timefreq() associated with  
> specifying
> channels. I attempted to select the channels beforehand using the
> “select data” option on the GUI. However, I then got the
> following error;
>
>>> timefreq(EEG.data, 250,'cycles', 7, 'wletmethod', 'dftfilt3',
> 'tlimits', [-200 1000],  'padratio', 2 );
> ??? Error using ==> timefreq at 367
> Value of winsize must be less than frame length.


The winsize problem is related to the size of your data epochs. Just  
change the default winsize ('winsize', 128 for instance). Usually  
newtimef() and newcrossf() take care of resolving this kind of issues.


> 3)	I would like a plot of frequencies between 2 and 80 Hz. I tried
> including this in the ‘freq’ input but got the error  
> message
> below. Can anyone explain this?
>
>>> timefreq(EEG.data, 250,'cycles', 7, 'wletmethod', 'dftfilt3',
> 'tlimits', [-200 1000], 'freqs', [2 80], 'padratio', 2 );
> Using 7 cycles at all frequencies.
> ??? Error using ==> timefreq>gettimes at 685
> Not enough data points, reduce the window size or lowest frequency


Same as 2.


> 4)	‘wletmethod’ can be  defined both in “optional
> inputs” and “optional FFT/DFT parameters”.I would  
> like
> to select Morlet wavelets (dftfilt3). Do I need to define this in both
> “optional inputs” and “optional FFT/DFT
> parameters”?


Morlet is the default. No need to define it.


> 5)	The input ‘type` in “Optional ITC type” has  
> given me
> some confusion. Am I correct in thinking that this function creates a
> time-frequency plot for the selected epoch and nothing more??


This function does not create any plot. Use the newtimef() function  
instead.


> 6)	I have read this function outputs to an array named  
> “tf”.
> Is it possible to programme it to produce a graphical plot as well?


Yes, use newtimef().


> 7)	Has timefreq() been replaced by another function that is better  
> to use?


timefreq is up to date but plotting is done though newtimef().
Hope this helps,

Arno




More information about the eeglablist mailing list