New low-level routines for mtmconvol and mtmfft implemented

Roemer van der Meij r.vandermeij at DONDERS.RU.NL
Tue Jul 27 16:48:46 CEST 2010


Hi everybody,

I just finished fully implementing the new low-level frequency analysis
routines for cfg.method = mtmconvol and mtmfft. They are not yet used by
default, and I would appreciate if it can be tested more before
optimizing computation speeds (should be relatively equal now, but many
optimizations possible).

The new routines can be used by adding a third input argument to your
ft_freqanalysis calls, as:
New implementation:
freq = ft_freqanalysis(cfg,data,1)
Old implementation (default):
freq = ft_freqanalysis(cfg,data,0)

*Things that are different:*
- all mtmconvol output is now phase-shifted such that an angle of 0 of
any fourier-coefficient /always /means a peak of an oscillation in the
data, and an angle of pi will /always/ mean the trough of an oscillation
(wavelet wise angle = 0 is implemented as cosine at peak, and sine in
up-going flank)
- all mtmfft output is now phase-shifted such that any angle from any
fourier-coefficient is from the perspective of the oscillation in the
data being at its peak at time = 0
- mtmconvol now uses an accurate frequency vector for building its
wavelets (determined by fsample and nsample, with cfg.foi as starting
point), instead of an /uncorrected/ cfg.foi (mtmfft already used an
accurate one) (note: this causes slight differences between the old and
new implementation)
- mtmfft can now take a cfg.foi input-vector as well, instead of the
usual cfg.foilim (backwards compatible)
- because of the above, nearly /all/ fourier-output is different, but
e.g. phase differences between coefficients should be the same
- we decided to drop the support for variable number of tapers in
mtmconvol, cfg.tapsmofrq can only be a scalar now (warning is given, and
first element of vector is selected)
  - in the new format, many things can be upgraded/implemented etc. in
the future


As freqanalysis is a rather fundamental pilar of FieldTrip, I would
really appreciate if some of you can do some testing based on the above
differences and anything else you can think of. Different types of data,
different approaches, etc. to see if both implementations give
comparable results and such (do note raw fourier-coefficients will
almost always be different). It could be I missed some fields from the
old functions that I diligently checked, or made some errors that did
not affect my current testing environment.
I can be reached at the e-mail address below, via the mailing-list, or
via bug-reports. Thanks in advance.

All the best!

Roemer


PS: the changes will be on the ft-server tonight, but are of course
already in the svn-version

--
Roemer van der Meij MSc
PhD student
Donders Institute for Brain, Cognition and Behaviour
Centre for Cognition
P.O. Box 9104
6500 HE Nijmegen
The Netherlands
Tel: +31(0)24 3655932
E-mail: r.vandermeij at donders.ru.nl


----------------------------------
The aim of this list is to facilitate the discussion between users of the FieldTrip  toolbox, to share experiences and to discuss new ideas for MEG and EEG analysis. See also http://listserv.surfnet.nl/archives/fieldtrip.html and http://www.ru.nl/neuroimaging/fieldtrip.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20100727/f621bf9a/attachment-0001.html>


More information about the fieldtrip mailing list