[Simnibs-discuss] transformation matrix usage

Oula Puonti oulap at drcmr.dk
Wed Feb 8 16:33:31 CET 2023


Hi Stefan,

Have a look at this function, which defines matsimnibs based on a
center coordinate and a "y-direction" pointing away from the coil
handle:

https://github.com/simnibs/simnibs/blob/efd0e3df2ed74a68238055ffeaca594f721a584e/simnibs/mesh_tools/mesh_io.py#L1840

The z-direction is defined to be normal to the nodes on the skin so the
coil should be more or less tangential to the scalp.

Best,
Oula


On Mon, 2023-02-06 at 12:48 +0000, Haren, S.L. van (Stefan, Student M-
TM) wrote:
> Hello all,
>  
> I am still quite new to using SimNIBS, and I am struggling with one
> of the attributes in the Position format. I am using the
> transformation matrix from the pos.matsimnibs function for more
> accurately positioning my TMS coil over the scalp of a subject. I
> know the coordinates of my coil and I can fill them in into the
> matrix and get the correct centre of the coil. However, I cannot
> figure out how to rotate the coil/coordinate system using the
> transformation matrix. I am unable to get it to be perpendicular to
> the scalp or change direction altogether. 
>  
> Hopefully someone can help me with my struggles,
> Stefan
>  
>  
> _______________________________________________
> Simnibs-discuss mailing list
> Simnibs-discuss at drcmr.dk
> https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss



More information about the Simnibs-discuss mailing list