[Eeglablist] wavelet decomposition with newtimef() - losing time points

Makoto Miyakoshi mmiyakoshi at ucsd.edu
Wed Aug 22 10:24:49 PDT 2012


Dear Luis,

'freqs', [0.5 50] means that you want to calculate down to 0.5 Hz.
One cycle of 0.5 Hz sine wave is 2000 ms long.
Your code also tells me that the cycle is now fixed to be 1 (which I
can't recommend, by the way).

In wavelet trransform, you generate one datapoint per a window, which
means that your 2000 ms window on EEG will be 1 data point of
ERSP/ITC. Imagine what happens when you apply this 2000 ms window to
your data, especially at beginning and ending. Your 0-2000 ms of EEG
data will be your 1001 ms and not 1 ms datapoint of ERSP/ITC, right?

I did not know 'timesout', 0:20:9900 works... if it works that's fine.
However, if it does not work, try 8000/20= 400 (approximately) to
obtain 20 ms resolution.

Makoto


2012/8/20 Luis R. Piloto <lpiloto at princeton.edu>:
> Hi everyone,
>
> I'm trying to use newtimef() to do Morlet wavelet time-frequency decomposition of my data.  Specifically, I have 10 second epochs at a sampling rate of 250 Hz (giving me 2500 time points or "frames") and I'm trying to calculate the power at each integer frequency between 1 and 50.  Additionally, I'd like to calculate the power for ever 20 millseconds, i.e. every 5 time points.  I have successfully called this function, but every time I do, it tells me that the time points I'm asking for need to be reduced and so I lose some timepoints at the beginning of my data and at the end of my data (depending on the window size).  Is there a way to avoid losing this data using newtimef() and return a signal that's the exact same length as my original signal?  Here's a sample call where I have it calculating the frequency for every 0.1 Hz and *trying* to calculate it for every 20 milliseconds.  Thanks in advance!
>
> [decomp_data, itc, powbase, times,freqs,erspboot,itcboot,tfData] = newtimef(data_matrix,2500,[0 9900],250,1,'freqs', [0.5 50], 'freqscale', 'linear', 'plotersp','off', 'plotitc', 'off', 'nfreqs', 501, 'timesout', 0:20:9900,'baseline',Nan);
>
> Regards,
> Luis Piloto
> _______________________________________________
> 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
JSPS Postdoctral Fellow for Research Abroad
Swartz Center for Computational Neuroscience
Institute for Neural Computation, University of California San Diego




More information about the eeglablist mailing list