[Simnibs-discuss] Focality with a specific threshold

Oula Puonti oulap at drcmr.dk
Wed Nov 16 11:49:40 CET 2022

Hi Laurent,

Please see here for the function that calculates the field_summary:


If you want to calculate a different percentile you can do this (in python):

from simnibs.msh import mesh_io

m = mesh_io.read_msh('ernie_TDCS_1_scalar.msh')

#This produces volumes with 50%tile

m.fields_summary(roi=2, percentiles=[50])

#This produces areas

m.fields_summary(roi=1002, percentiles=[50])

Note that the output units differ between the two calls, for volumes it 
will be mm^3 and for areas it will be mm^2. This will depend on the roi 
you pass. roi=2 means that you calculate the volume of the tetrahedra 
where the field is higher than the %tile you define, whereas for 
roi=1002 calculates the area of the triangles the same way.



On 11/15/22 10:49, LAURENT TORLAY wrote:
> Hello,
> First, I use Simnibs for several years and thank you for developping 
> such a software !
> My question : in the file fields_summary.txt, focality is measured by 
> 'area with a field >= X% of the 99.9th percentile', how can we get a 
> similar measurement with a specific threshold in V/m ? (moreover, why 
> the result is a volume ? The area is multiplied by a mean cortical 
> thickness (of the area, the whole brain ?) )
> Thanks in advance,
> Best,
> L. Torlay
> _______________________________________________
> Simnibs-discuss mailing list
> Simnibs-discuss at drcmr.dk
> https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.drcmr.dk/pipermail/simnibs-discuss/attachments/20221116/60dd15d7/attachment.html>

More information about the Simnibs-discuss mailing list