[Eeglablist] Problem with base line in time-frequency
Arnaud Delorme
arno at salk.edu
Fri Sep 7 05:50:09 PDT 2007
Dear Laszlo and Johan,
yes, the trimming is due to the wavelet window size. It is pretty easy
to compute it and it depends on two factors, one being the number of
cycle of your wavelet (at the lowest frequency) and the second being the
lowest frequency. For instance, for a wavelet at 3 Hz using 3 cycles,
the total length of the wavelet window is 1 second so there will be 500
ms trimming on each side. For a 6 Hz wavelet at 3 cycles, there will be
only 250 ms trimming. To change the plotted time-frequency limits you
may thus
1) As Laszlo points out, you may increase the length of your epochs to
reduce the trimming effect.
2) Increase the lowest frequency.
3) Decrease the number of cycle at the lowest frequency.
(or for FFT decrease the window size).
By default, in the newtimef() or timef() function, you specify the
number of cycle at the lowest frequency and the window size at the
lowest frequency (in terms of number of sample points), and the function
will automatically compute the lowest frequency.
If you choose to increase epoch length, you may introduce bias from the
previous stimuli. At 3Hz and 3 cycles, it means that the window size is
1 second. Therefore the time-frequency estimate at 3 Hz and 250 ms for
instance is computed by using data from -250 ms to 750 ms. Of course,
the envelop of a wavelet is gaussian, so tails contribute little to the
wavelet spectral estimate, but it is important to keep that in mind.
With wavelets, the window size decreases as frequency increases (in
contrast to pure FFT where the window size is constant). Also I must
point that we use "modified wavelets" not real wavelet (where the number
of cycle is constant at all frequency and frequency spacing is also
geometrical (1 2 4 8 16 32... Hz)). For instance, in newtimef() you may
tune the number of cycle at each frequency. This is because, we are
using these wavelets for visualizations purposes (and not compression
purposes where "real" wavelets are used). For instance, at a low
frequency (3Hz) you will want to use a low number of cycle (3) otherwise
the window length becomes ridiculously long (since we are usually
interested in transient changes triggered by stimuli). At 40 Hz however,
3 cycles are not selective enough in terms of frequency (people usually
use 8 cycles - this correspond to a window size of 200 ms). Since the
number of cycle differ at each frequency and we do not use geometrically
spaced frequencies, we cannot really call our modified wavelet real
"wavelet". Just a vocabulary issue.
Best,
Arno
Laszlo Balazs wrote:
> Hi,
> I am less then a newbie in timefreq analysis but still let me ask again.
> Does the trimmed off section necessarily have to be a real baseline or
> could it be a part of the previous trial? This way Johan could have
> overlapping epochs from -1500 to 2500 and could analyze -1000 to 2000.
> (Assuming cca 3Hz low freq and 3 cycle wavelet.) In other words could
> the activity from -1500 to -1000 influence the output after -1000 due to
> convolution with the wavelets?
> Best,
> Laszlo
>
More information about the eeglablist
mailing list