from simnibs import optimization opt = optimization.TDCSoptimize() target = opt.add_avoid()
opt = opt_struct('TDCSoptimize'); opt.avoid(1)
positions: Nx3 list/array of floats (Python/MATLAB)
Desctiption: Positions where the field is to be avoided (see here for more information).
Description: Weight to be given to this avoid region. The largest the weight the more SimNIBS will avoid this region. Must be \(> 1\).
indexes: Nx1 list/array of ints (Python/MATLAB), optional
Description: As an alternative to positions, you can select the node index or the element index (see here for more information).
Default: Get the points closest to the positions.
radius: float, optional
tissues: list/array of ints (Python/MATLAB), optional
Descrption: List of tissue indices where the target is defined. Leave empty if all tissues in the leadfield.
Default: All tissues
You can leave positions and indexes empty and only assign tissues. In this case, the avoidance region will be the whole tissue. This can be useful, e.g. to avoid co-stimulation of the eyes when designing a tACS montage.