Beamformer time course
Robert Oostenveld
r.oostenveld at FCDONDERS.RU.NL
Wed May 17 10:55:33 CEST 2006
Hi Marie,
It is possible to use the cfg.keepfilter='yes' option both with lcmv
and with dics, and also both techniques are implemented such that
they will re-use the previously computed filters. So you can first do
dics with keepfilter, and then use those filters in the subsequent
lcmv analysis.
That would look like this:
cfg = []
cfg.method = dics
cfg.dics.realfilter = yes <=== see below
cfg.keepfilter = yes
...
source_d = sourceanalysis(cfg, freq)
cfg = []
cfg.method = lcmv
cfg.keepfilter = no
cfg.grid = grid <=== see below
...
source_l = sourceanalysis(cfg, timelock)
The cfg.grid option allows to specify precomputed leadfields (i.e.
the output of prepare_leadfield), but also precomputed filters, which
is done here. The easiest is then to do grid=source2grid(source_d)
after the dics and before the lcmv analysis. The source2grid helper
function strips all irrelevant elements from the source_d structure
and will only retain the information that is relevant for the
sourceanalysis on the second dataset. It assumes that you use exactly
the same channels in both analyses.
A conceptual problem that you will run into is that, according to the
original description of dics (gross 2001), the filters are complex-
valued. Multiplying these complex filters with real data will result
in complex valued source projections, which is weird to say the
least. I consider that to be an error in the DICS algorithm. The
solution for that is that our implementation, which by default will
return complex filters in accordance with the original DICS
description, can also use and return real-valued filters. That is
enabled by the (undocumented) option cfg.dics.realfilter='yes'.
Please download the latest (i..e. yesterdays) version of fieldtrip
from the FTP, and replace fieldtrip/source2grid.m and fieldtrip/
private/beamformer.m with the attached updated functions (I just
tested the procedure described above, and there were a few details in
the code that had to be changed).
best regards,
Robert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: beamformer.m
Type: application/octet-stream
Size: 26935 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20060517/c5c0c9f0/attachment-0004.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: source2grid.m
Type: application/octet-stream
Size: 1300 bytes
Desc: not available
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20060517/c5c0c9f0/attachment-0005.obj>
-------------- next part --------------
On 16 May 2006, at 18:21, Marie Smith wrote:
> Hi
>
> Thanks a lot for your response, your explanations seem clear to me.
>
> I have also talked with Klaus Kessler about this. He has in the
> past used DICS to generate the filter for a specific time/freq box,
> and then applied this filter to the time locked data in order to
> compute synchronization between regions etc.
> I realise this would also not be possible smoothly, but does it
> make sense to generate a filter using the cross spectral density
> matrix for a given time/freq range (cf DICS) - and then applying
> this filter to the covariance of the time averaged data?
>
> Marie
>
>
>
>
> On 12 May 2006, at 18:22, Robert Oostenveld wrote:
>
>> Dear Marie,
>>
>> On 10 May 2006, at 16:31, Marie Smith wrote:
>>> I have a question about the solution of a beam-former analysis
>>> and would appreciate any suggestions. Having used the beam-former
>>> technique to localize a region of interest for a specific time-
>>> frequency range, is there some function that can be implemented
>>> to compute the time course of activation for this roi?
>>
>> For that you would use a time-domain beamformer, i.e. the lcmv
>> beamformer (cfg.method='lcmv' in sourceanalysis). That requires
>> time-domain data as input, so you should use timelockanalysis to
>> compute the covariance and the average. The covariance is used to
>> construct the beamformer filter and the average is projected
>> through the filter. If you want to project single-trial data
>> through the filter, you should keep the trials in timelockanalysis
>> and use the option cfg.singletrials='yes' in sourceanalysis (see
>> its help).
>>
>> If you are interested in a specific frequency band, you can use a
>> band-pass filter in timelockanalysis (the options for that are
>> hidden in the documentation, but they are the same as in
>> preprocessing, e.g. bpfilter='yes' and bpfreq=[low high]). It
>> could also be that you want to use a filter based on a narrow
>> frequency band and use it to beam the broad-band data. That is
>> also possible, but not smoothly: you have to do timelockanalysis
>> twice (broadband and narrowband) and replace the broadband
>> covariance with the filtered narrowband covariance. I hope this
>> short explanation is enough.
>>
>> Robert
>
More information about the fieldtrip
mailing list