[FieldTrip] Input to SVD cannot be NAN, and dipole lies on boundary

RICHARDS, JOHN RICHARDS at mailbox.sc.edu
Sun Oct 4 01:37:36 CEST 2015


I am trying to create a lead field matrix for a BEM Dipoli model.  For this model I have a 4-compartment BEM model, based on a realistic head model from a participant MRI; meshes for skin, skull, csf, and brain; and source model is a grid on the gray matter.  I use the Dipoli external tools (from FT calls) to create a Dipoli head model, and then lead field with the grid and electrodes.

I have gotten this to work for a lot of subjects and data, but am stumped on one particular subject.  For this one I can get all the way through the pipeline (grid, electrodes, mesh, head model, and leadfield).  But when I go to get the source map, I get the error mentioned in other posts “Input to SVD cannot be NAN”.  I have not tracked this down, but it appears that the LF matrix has NaN’s in it.

I went back to the head model.  When it is being created I get:

Warning: dipole lies on boundary of volume model
> In inf_medium_leadfield (line 54)
  In eeg_leadfieldb (line 93)
  In ft_compute_leadfield (line 431)
  In ft_prepare_leadfield (line 225)
  In CreateFieldtripLecomputing leadfield 6723/63422

This comes from

for i=1:Ndipoles
  r = pnt - ones(Npnt,1) * rd((1:3) + 3*(i-1));
  R = (4*pi*cond) * (sum(r' .^2 ) .^ 1.5)';
  if any(R==0)
    warning('dipole lies on boundary of volume model');
  end
  lf(:,(1:3) + 3*(i-1)) = r ./ [R R R];
End

Apparently the dipole locations in the source model grid are right on the boundary of one of the vertices or triangles of the volume mesh, so one of the R’s is zero, and the NaN is apparently from the [R R R] as a div / 0.  This is just a guess, because I haven’t tracked down where the “Input to SVD cannot be NaN” is coming from.

I tried shrinking or expanding the inner compartment (brain), hoping that it would not then overlap with the source model locations.  This did not work. I tried shrinking the source model locations, though don’t want to do this because these are actual GM in the participant, but it did not work anyway.

Any suggestions or help on this?

Thanks, John


***********************************************
John E. Richards Carolina Distinguished Professor
Department of Psychology
University of South Carolina
Columbia, SC  29208
Dept Phone: 803 777 2079
Fax: 803 777 9558
Email: richards-john at sc.edu<mailto:richards-john at sc.edu>
HTTP: jerlab.psych.sc.edu
***********************************************

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20151003/7dc66a21/attachment-0001.html>


More information about the fieldtrip mailing list