[Simnibs-discuss] Network Optimisation Avoid Tissues

Axel Thielscher axelt at drcmr.dk
Wed Feb 17 14:41:28 CET 2021


Hi,

the weights in the eyes are set to zero for TDCS network optimization as 
standard. There is currently no option to include the eyes into the 
optimization. Its a good point, and we will try to add it in the future. 
For now, we can only offer you a hacking solution. In the 
*opt_struct.py* file in the simnibs installation on your computer, 
*lines 2258 ff *(see 
https://github.com/simnibs/simnibs/blob/master/simnibs/optimization/opt_struct.py):

         # setting values in eyes to zero
         if np.any(self.mesh.elm.tag1 == 1006):
             logger.info('setting target values in eyes to zero')
             if self.lf_type == 'node':
eye_nodes=np.unique(self.mesh.elm.node_number_list[self.mesh.elm.tag1 == 
1006,:])
                 eye_nodes = eye_nodes[eye_nodes>0]
*field[eye_nodes-1] = 0.0 # node indices in mesh are 1-based*
             elif self.lf_type == 'element':
*field[self.mesh.elm.tag1 == 1006] = 0.0*

Replace the 0.0 in the bold lines by some negative weights. You will 
have to manually step through a few values to see which one work well 
for you.

Best,

Axel



On 2/12/2021 1:21 PM, Kaiser, Max (Stud. FPN / Alumni FPN) wrote:
> Hi SimNIBS Team,
>
> I wanted to use the tDCS network optimisation function for a tACS experiment.
> When I run the optimization, the electrodes are clustered around the frontal areas, stimulating the eyes substantially.
> However, the avoid.tissue function only worked for „single-target“ but not for the network-targeted optimisation.
> Is there a possibility to implement the avoid function for the network optimisation?
>
> Thank you in advance!
>
> Kind regards,
> Max.
> _______________________________________________
> Simnibs-discuss mailing list
> Simnibs-discuss at drcmr.dk
> https://mailman.drcmr.dk/mailman/listinfo/simnibs-discuss

-- 
Dr. Axel Thielscher
Associate Professor
Danish Research Center for Magnetic Resonance
Copenhagen University Hospital Hvidovre
DK-2650 Hvidovre, Denmark
www.drcmr.dk
&
Department of Health Technology
Technical University of Denmark
DK-2800 Kgs. Lyngby
http://www.healthtech.dtu.dk/

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


More information about the Simnibs-discuss mailing list