[Simnibs-discuss] Question about the scripting electrodes and the connector with Python

Gülce Lale G.Lale at campus.lmu.de
Thu Nov 3 11:16:08 CET 2022


I have a question about scripting simulation with python which can also be beneficial for others. Could you share it in the mailing list? Thank you.

I am currently working on a project where I have to simulate our tDCS with python in SimNIBS. I am trying to write a script, where I give the electrode coordinates, dimensions, and other parameters within the script. In addition to the electrode, I have to model the connector (the plug). 
The anode is 5x5 and its connector has a height of 2.3 and width of 1.3. Whereas, the cathode is 4x4 and the connector has the same height and width. I calculated the plug dimensions and the distance from the centre of the electrode, however, when I try to model it in SimNIBS I have 2 problems:

1. Since I have both a cathode and an anode, I have to simulate 2 plugs. However, when I try to simulate them I got this following error for the second electrode’s plug: NotImplementedError in the function put_electrode_on_mesh. Which tells me that the length of the plug shouldn’t be greater than 1 (len(elec.plug)<1).
2. I tried to simulate only one electrode with a plug, and simulated the other electrode without a plug. Then, I noticed that the plug isn’t being simulated at all. Or, I can not see it on the SimNIBS pop up screen which opens after running my simulation script. 

I wanted to ask if anyone simulated the connector(plug) of the electrode before, and by any chance has a solution to my problem.

Thank you for your answers in advance.
Best,
Gülce


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mailman.drcmr.dk/pipermail/simnibs-discuss/attachments/20221103/294fd96c/attachment.html>


More information about the Simnibs-discuss mailing list