Beamformer time course
Robert Oostenveld
r.oostenveld at FCDONDERS.RU.NL
Tue May 23 12:12:48 CEST 2006
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
More information about the fieldtrip
mailing list