lcmv localization

Robert Oostenveld r.oostenveld at FCDONDERS.RU.NL
Wed Nov 1 15:01:17 CET 2006

Dear Luca,

On 31 Oct 2006, at 18:28, Luca Ciancetta wrote:
> I'm trying to localize a source with the lcmv method.

I understand that you want to use simulated and SEF data. What kind
of MEG system do you have? In the code below, you seem to be putting
effort into construcing some details that I would not expect to be
neccessary (but I might be wrong).

> Following, it's the configuration I use:
> time_step = 1/h.smpfq; % the time step depends by sampling frequency
> time = 0:time_step:(500*time_step); % I want to see 500 points of data

this will give you 501 samples, the first sample is "0", the second
is "1" etc.

> data.trial{1} = data_raw(gch,0:500); % gch: list of good channels
> data.time{1} = time;

I suggest that you construct the "grad" seperately, and that you
store it in the data (i.e. data.grad = your structure). That also
helps for plotting the data.

> cfg = [];
> cfg.method = 'lcmv';
> cfg.grid.pos = model; % model is a matrix [number_of_sources X 3].
> This represent position of dipoles in the reference of the sphere
> which contains them.

> cfg.grad.tra = zeros(nch,nch); % number of good sensors ( size of
> 'gch' list )
> for i=1:nch
>     cfg.grad.pnt(i,: ) ='; %
> positions of MEG sensors in the reference of the spherical model
>     cfg.grad.ori(i,: ) ='; %
> orientations of MEG sensors in the reference of the spherical model
>     cfg.grad.tra(i,i) = 1;
>     cfg.grad.label{i} = sprintf('MZ_%d\n',gch(i)-1);
> end

Note that all orientation vectors should have length 1, i.e. norm

The MEG sensors are usually given in head coordinates (i.e. related
to the nose and ears in most MEG systems), and the (spherical) volume
conduction model can also be defined in head coordinates. SO you
don't have to express the positions of MEG sensors in the reference
of the spherical model. If you do that, you should also express your
dipoles in the same spherical model. All geometrical objects
(sensors, dipoles, geometry of the head model) should be expressed in
the same coordinates and the same units.

> cfg.vol = [];
> cfg.vol.r = 65;

I presume that you use "mm" as units? You should also add the center
of the sphere, i.e.
cfg.vol.o = [0 0 0];
The center of the sphere is by default in the origin, but it is good
to be explicit about it.

> cfg.bpfilter      = 'yes';
> cfg.bpfreq        = [1 100];

These settings are _not_ used in SOURCEANALYSIS.

> data.avg = squeeze(data.trial{1});
> source = sourceanalysis(cfg,data);

Probably you want to use a protocol like this
  preprocessing -> timelockanalysis -> sourceanalysis
where the preprocessing is done manually (i.e. not in FT). You can do
timelockanalysis manually as well, but it is more convenient to use
FTs timelockanalysis anyway. The filter options above relate to
timelockanalysis. Furthermore, you should use cfg.covariance='yes' in
timelockanalysis, and you can specify a covariance latency window.

> In this case I used only one trial and the result is a localization
> in the center of the sphere ( the source is a dipole simulation, it
> was placed on the surface of my spherical model).
> Also analyzing over more trials or using different data set, for
> example a median nerve stimulation, the result was the same.

To me it is not clear where your data comes from (since you include
only parts of your script), and therefore it is not clear where your
problem stems from. See my suggestions above. Your problem may also
be related to plotting the power, and not the neural activity index
(source.avg.nai, obtained after SOURCEDESCRIPTIVES), the beamformer
power is biuassed to deep locations, the NAI corrects that. See
id=fieldtrip:documentation:tutorial:beamformer#plot_the_result and
further on that page.

best regards,

More information about the fieldtrip mailing list