[FieldTrip] ft_prepare_bemmodel: vol.mat is NaN

Robert Oostenveld r.oostenveld at donders.ru.nl
Sat Jan 28 16:08:32 CET 2012


Hi Akiko

The triangulated mesh might look nice, but that is not yet a guarantee that it is suitable for BEM computations. Cristiano (CC) has been working on a set of fieldtrip functions to create, manipulate and check surface meshes. Those functions are not yet in fieldtrip, but perhaps this would be the time to give them a try. 

Could you send us the surfaces that you feed into ft_prepare_bemmodel as a mat file, together with the cfg? Cristiano can then have a look at them with his function, which hopefully will poinpoint the geometrical problem that is causing the numerical issue.

best
Robert

PS see http://fieldtrip.fcdonders.nl/faq/how_should_i_send_example_data_to_the_developers

On 27 Jan 2012, at 17:36, Akiko Ikkai wrote:

> Hi,
> 
> I'm wondering if there has been more conversations on the post "function prepare_bemmodel: resulting BEM system matrix is NaN", dated back to 2/17/2010. I have the same problem and would love to know how to work around it. In short, I'm trying to create a volume conduction model for my EEG data based on subjects' segmented anatomical MRI ('scalp','skull','brain'). ft_prepare_bemmodel creates vol that can be plotted nicely (using ft_plot_vol), but vol.mat is all Nan. I tracked down the error to be originated in ft_prepare_bemmodel, line 162 (20110525 version)  
> 
> C21    = bem_Cij_lin(vol.bnd(2).pnt,vol.bnd(1).pnt,vol.bnd(1).tri, weight,defl(1));
> 
> the original post suggests to 1) find where NaN are, 2) check their actual location in vol.bnd(1).pnt and in vol.bnd(1).tri, and then 3) correct the mesh, by removing the collapsed vertex/triangle. I was able to find where NaN are in C21, but am stuck at how to proceed from here. 
> 
> If anyone has suggestions on how I could go from here, it'll be greatly appreciated.
> Thanks in advance, Akiko   
> 
> -- 
> Akiko Ikkai, Ph.D. 
> Postdoctoral Fellow
> Department of Psychological and Brain Sciences
> Johns Hopkins University
> Ames Hall, 3400 N. Charles St.
> Baltimore, MD 21218
> 
> 
> _______________________________________________
> fieldtrip mailing list
> fieldtrip at donders.ru.nl
> http://mailman.science.ru.nl/mailman/listinfo/fieldtrip

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.science.ru.nl/pipermail/fieldtrip/attachments/20120128/9ea5337d/attachment.html>


More information about the fieldtrip mailing list