Beamformer time course

Christian Hesse c.hesse at FCDONDERS.RU.NL
Wed Nov 15 17:59:02 CET 2006

Hi Dasha,

you could try averaging the single trial covariance matrices
(preserving the spatial correlation structure of both time-locked and
non-time-locked activity). Then replace the single-trial covariance
matrices in your timelock data structure with that average and call
lcmv with cfg.rawtrial = 'yes';

However don't expect miracles, because:
a) single trial estimates will always be noisy
b) if there is significant head-movement between trials, then using
the average covaraiance matrix may not do much better than single
trial covariance estimates (because you effectively havve moving

Hope this helps.

On 15 Nov 2006, at 17:31, Daria Osipova wrote:

> Hi
> In continuation of this discussion...
> I would like to use the lcmv method to localize sources of (band-pass
> filtered) ongoing alpha which I can use as spatial filters for my
> (unfiltered) data.
> From the previous discussions on lcmv it seems that most people try to
> estimate covariance matrix from the average since they are doing ERFs.
> In my case data is not time-locked so I have to estimate it from
> single
> trials and not from the average (I would think).
> But judging from your response, Robert, it seems that cfg.rawtrial
> = 'yes'
> (which uses covariance matrix from single trials and applies it to
> single
> trials) produces a noisy estimate.
> Is there a workaround then?
> Thanks in advance
> Best regards,
> Dasha
> PS I need time-domain data
> -----Original Message-----
> From: FieldTrip discussion list [mailto:FIELDTRIP at NIC.SURFNET.NL]
> On Behalf
> Of Robert Oostenveld
> Sent: Tuesday, May 23, 2006 12:13 PM
> Subject: Re: [FIELDTRIP] Beamformer time course
> Hi Marie,
> On 22 May 2006, at 17:18, Marie Smith wrote:
>> I have been trying out the various methods as discussed and have
>> come across a problem.
>> When I select cfg.singletrials = 'yes'  I get a number of error
>> messages saying
>> error('this option contains a bug, and is therefore not supported
>> at the moment');
>> I am using the toolbox  fieldtrip-20060516.
>> I noticed however, if I select cfg.rawtrials = 'yes' the function
>> will run.
> I recall disabling this functionality, since it was rarely used and
> since I was concerned that it would not be correct. I now had a more
> detailled look at the code.
> If you do rawtrial=yes, beamformer uses the single-trial covariance
> to construct the filter and also applies it to the single trial
> covariance/csd. That results in a very poorly estimated filter in
> each trial, hence projecting large amounts of noise and a lot of
> variance over trials. Therefore we found it not to be very usefull on
> real data, although conceptually and in the code it is correct.
> The idea behind singletrial=yes is that beamformer uses the average
> covariance to construct the filter and applies it to the single trial
> covariance/csd. The problem in the code however is that beamformer
> would use the averaged covariance/csd to estimate the power and not
> the single trial covariance/csd. The estimated single-trial
> timecourse would be correct, but the power would not be correct.
> Therefore I disabled that option in the code.
> The solution is something that you can do yourself in two subsequent
> runs of sourceanalysis: you can do sourceanalysis on the average
> (i.e. do not specify any of singletrial/rawtrial options) and specify
> keepfilter=yes. That will give you the filter, computed on the
> average covariance. Subsequently do cfg.grid=source2grid(source), and
> use the resulting grid (including the filters) in the second run of
> sourceanalysis, in which you specify cfg.rawtrial=yes. In the second
> run, the previous (based on average covariance) filters will be
> applied to the unaveraged data, resulting in the desired single-trial
> power and dipole moment.
> best regards,
> Robert

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