Back to the main page.

Bug 160 - Bug in LCMV beamformer

Status CLOSED FIXED
Reported 2010-09-17 16:25:00 +0200
Modified 2011-01-06 09:16:08 +0100
Product: FieldTrip
Component: inverse
Version: unspecified
Hardware: PC
Operating System: Windows
Importance: P1 normal
Assigned to: Jan-Mathijs Schoffelen
URL:
Tags:
Depends on:
Blocks:
See also:

Vladimir Litvak - 2010-09-17 16:25:58 +0200

When specifying a grid with locations and orientations for each dipole I get a crash with: creating dipole grid based on user specified dipole positions 3 dipoles inside, 0 dipoles outside brain computing leadfield computing leadfield 1/3 computing leadfield 2/3 computing leadfield 3/3 scanning repetition 1 using precomputed leadfields scanning grid ??? Error using ==> mtimes Inner matrix dimensions must agree. Error in ==> beamformer_lcmv at 200 lf = dip.leadfield{i} * dip.mom(:,i); Error in ==> ft_sourceanalysis at 795 dip(i) = beamformer_lcmv(grid, sens, vol, squeeze(avg(i,:,:)), squeeze(Cy(i,:,:)), optarg{:}); It looks like the leadfield that is computed in this case is already oriented and then the code tries to orient it again by multiplying with the moment. Here is the input to ft_sourceanalysis: cfg = reducerank: 2 grid: [1x1 struct] grad: [1x1 struct] inwardshift: -30 vol: [1x1 struct] channel: 'MEG' method: 'lcmv' keepfilter: 'yes' keepleadfield: 'yes' lambda: '0.01%' K>> cfg.grid ans = pos: [3x3 double] mom: [3x3 double]


Jan-Mathijs Schoffelen - 2010-11-10 10:24:55 +0100

I included a check in beamformer_* to not do an additional projection of the leadfield, if the leadfield is already scalar. @Vladimir, could you check whether it works now?