Beamformer of correlated sources

Cristiano Micheli michelic72 at GMAIL.COM
Sun Aug 10 17:29:18 CEST 2008

Dear  Jan-Mathijs
I tried to implement the double dipole DICS but without success.
I use a simulation with two correlated sources but I see only one in the
power and two spread sources not where i expect them to be in the coherence.
I performed the following step as suggested by you in the last email:

1) Calculation of cross spectral matrixes Cf (channel-channel), Cr (channel
reference) and Power of the reference Pr for a specific frequency.
2) Concatenation of the local leadfield with one of the dipoles' leadfield
for each point of the grid: 
  lf  = compute_leadfield(dip.pos(i,:), grad, vol, 'reducerank', reducerank,
'normalize', normalize);
  lf2 = compute_leadfield([0 5 10], grad, vol, 'reducerank', reducerank,
'normalize', normalize);
  lf  = [lf lf2];
3) Calculation of local spatial filter according to: filt = pinv(lf' * invCf
* lf) * lf' * invCf; 
4) Augmenting the filter according to:
  filt = [filt zeros(size(filt,1),1);zeros(1,size(filt,2)) 1]; 
5) Augmenting the Cf by introducing the reference-channels csd and reference
  Cf_ = [Cf Cr;Cr' Pr];
6) Sandwiching:
  csd = filt * Cf_ * ctranspose(filt);
7) Calculating power and coherence:
      pow = real(trace(csd(1:6,1:6)));
      coh = lambda1( csd(1:3,7))./ sqrt(lambda1(csd(1:3,1:3))*csd(7,7));

Where do i fail?
Is there something I do not understand? According to this scheme the power
of point 7 should take into account both dipoles and the coherence should
not be masked by the chosen dipole.



On Fri, 8 Aug 2008 14:30:38 +0200, jan-mathijs schoffelen
<j.schoffelen at PSY.GLA.AC.UK> wrote:

>Dear Cristiano,
>Nice simulation in figure 1!
>The way you did the second simulation is just the 'traditional' DICS,
>giving you a huge mountain of coherence around the reference location.
>This will drown any other true cortico-cortical coherence to the
>right hemisphere dipole. (Note that a double dipole approach will not
>be of too
>much help here, if you do a ccc-analysis with respect to your
>reference: this is an important point in the paper you refer to. The
>double dipole approach
>will hopefully be able to unveil low coherence of the second dipole
>to the reference, which is masked by the high power + high coherence
>(one of these,
>or perhaps both) in the reference dipole.)
>As such, the double dipole approach is not yet implemented in a
>straightforward way in the release-version of fieldtrip, but I will
>be happy to give you some handles:
>I would suggest to include the leadfield of the reference location in
>the grid with precomputed leadfields which will be passed in the
>configuration to sourceanalysis.
>You have to concatenate the dipole-location specific leadfields with
>the reference dipole's leadfield. This will give you leadfields of
>dimensionality Nx6 (or Nx2 if you
>have a reason to assume a fixed orientation).
>Subsequently you can run sourceanalysis with cfg.keepfilter = 'yes'
>and without cfg.refdip, to extract the filter coefficients. These
>will have the dimensionality 6xN for each
>double dipole, the first 3 rows corresponding to the location
>specific location, and the last 3 rows corresponding to the reference
>To then compute your 'dipole pair and reference channel'-based cross-
>spectral density you have to sandwich the sensor-level cross-spectral
>density (take care to have
>the channel-order identical to the channel order in the filters)
>between the augmented filters. You can augment the filters to
>accommodate for the reference channel in
>the following way: [filter zeros(size(filter,1),1);zeros(1,size
>(filter,2)) 1]; (make sure to put the reference channel last in the
>channel csd.
> From each sandwiched csd (7x7) you should be able to extract
>anything you want. The top-left 6x6 block will contain the between
>dipole csd (diagonal 3x3 blocks contain
>the within dipole parameters from which power can be estimated: the
>off-diagonal blocks contain the between dipole csd). The bottom right
>value will contain the reference
>signal power, and the 6x1 and 1x6 remaining vectors contain the
>reference to dipole csds, in two groups of 3. The coherence can be
>estimated (according to Joachim's 2001
>PNAS-paper) in this case by: svd( csd(1:3,7))./ sqrt(svd(csd(1:3,1:3))
>Good luck,
>On Aug 8, 2008, at 2:05 PM, Cristiano Micheli wrote:
>> Dear all
>> I have some questions about the use of DICS in the case of two
>> correlated
>> cortical activations.
>> I am using an isometric contraction protocol and i localized the
>> reference
>> dipole through cortico-muscular coherence with external myography and
>> (classic) DICS method. Now I have to calculate cortico-cortical
>> activations
>> and i use:
>> cfg               = [];
>> cfg.grid         = grid;
>> cfg.method    = 'dics';
>> cfg.projectnoise = 'yes';
>> cfg.lambda    = 0;
>> cfg.refdip   = ref_dipole_position;
>> cfg.frequency = 20;
>> cfg.hdmfile   = 'mymodel.hdm';
>> sourcecond    = sourceanalysis(cfg, freq);
>> According to Schoffelen et al. in order to disentangle the sources a
>> modification of the classic DICS algorithm is necessary.
>> Am i supposed to extract the two activations if they are correlated
>> with the
>> above written lines?
>> If not, how would it be a FT implementation to get to correlated
>> sources
>> localization with DICS?
>> I tried with simulation and apparently the above implemetation is
>> able to
>> localize only one source with a spread activation.
>> Attachments show:
>> '1sourceDICS.png' : simulation with an external reference channel
>> correlated
>> with a source in the left emisphere
>> '2sourcesCCCDICS.png': simulation with reference dipole (same as
>> above)
>> whose activity is correlated to a simmetric one in the right emisphere
>> Best
>> Cristiano
>> ----------------------------------
>> 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
>> archives/fieldtrip.html and
>> fieldtrip.<1sourceDICS.png><2sourcesCCCDICS.png>
>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 and

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 and

More information about the fieldtrip mailing list