TFR:boundaries, resolution

Christian Hesse c.hesse at FCDONDERS.RU.NL
Thu Mar 22 10:40:38 CET 2007

Hi Ulla,

On 22 Mar 2007, at 10:10, Ulla Rantakokko wrote:

> Thanks Christian,
> 1. & 2. Ok. I haven't succeeded well with multitapers because of
> memory
> problems. For some reason 'wltconvol' is also impossible for the
> same reason
> but this far 'tfr' works well (?) which is a little suprizing . I
> can get
> this far singleplot only.

Using multitapers is not really equally appropriate at all
frequencies, and especially not recommended at the "lower"
frequencies (say below 20 Hz). I guess it would be fair to say that
multitapers are most useful for "pulling out" activity in the high
gamma bands (> 60Hz).

At frequencies below 40 Hz, I would just use a hanning window and
specify the time frequency tiles using

cfg = [];
cfg.method = 'mtmconvol';
cfg.output = 'pow';
cfg.taper = 'hanning';
cfg.foi = [fbeg:fshift:fend];
cfg.toi = [tbeg:tshift:tend];
cfg.f_timwin = ones(max(size(cfg.foi)),1).*twin;

these cfg options essentially give you a "classic" spectrogram which
(in my opinion) should be the first step in any time frequency
analysis before using more "advanced" techniques such as wavelets or
multitapers (both of which, by the way, are much greedier in terms of
memory and computation time than the spectrogram). Depending on the
goals of your analysis and the frequency range of interest, there may
also simply not be sufficient motivation to use either wavelets or
multitapers at all.

In any event, in the above cfg options, twin is the width of your
time window in seconds, and the rest is probably  self explanatory.
You can also adjust cfg.f_timwin to have different lengths for
different frequencies if you wish. With the current settings you
should have less problems with running out of memory.

> I found the new layout files the minute I sent the mail... However,
> I get
>>> multiplotTFR(cfg, TFRmult_th_ad);
> ??? Undefined function or variable "Lbl".
> Error in ==> fieldtrip-20070226/private/createlayout at 244
> if ~any(strcmp('COMNT', Lbl))
> Error in ==> multiplotTFR at 234
> lay = createlayout(cfg.layout);

You may want to get the latest version of FT since there have been a
lot of changes in the past 2 weeks to the layout stuff. The call to
the function CREATELAYOUT (and the date stamp in your fieldtrip
directory :-) suggest that you are using an FT version which predates
the key changes made on 14.03.2007. It should be fine in the latest

> 4. A new idea to reduce the length of trial and thus get better
> pictures is
> to separate baseline from the data-trials to one baseline set. How
> can I
> relate the baseline with the data as whole information and not just
> time
> limits. Am I making myself clear ?

Not 100%, sorry. Can you say (write) that again?


Christian Hesse, PhD, MIEEE

F.C. Donders Centre for Cognitive Neuroimaging
P.O. Box 9101
NL-6500 HB Nijmegen
The Netherlands

Tel.: +31 (0)24 36 68293
Fax: +31 (0)24 36 10989

Email: c.hesse at

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the fieldtrip mailing list