TDCSDistributedOptimize

TDCS optimization problem with a distributed target defined in a NIfTI file.

Initialization

  • Python

    from simnibs import opt_struct
    opt = opt_struct.TDCSDistributedOptimize()
    

  • MATLAB

    opt = opt_struct('TDCSDistributedOptimize');
    

Attributes

  • leadfield_hdf: string (Python)/character array (MATLAB)

    opt.leadfield_hdf = 'tdcs_leadfield/ernie_leadfield_EEG10-10_UI_Jurak_2007.hdf5'
    

  • name: string (Python)/character array (MATLAB)

    • Desctiption: Name of the optimization problem. Gives the path and the prefix to the output files

    • Example: Python/MATLAB

      To have the output files from the optimization in the tdcs_leadfield/ folder and the motor_cortex prefix

    opt.name = 'tdcs_leadfield/motor_cortex'
    

  • target_image: str

    • Description: Image to be emulated with the optimization

    • Example: Python/MATLAB

      Suppose we have a T-map representing a functional network called T_map.nii.gz

    opt.target_image = 'T_map.nii.gz'
    

  • mni_space: bool, optional

    • Descrption: Wether the target_image is in MNI space.

    • Default: True

  • subpath: str, optional

    • Descrption: Path to the subject m2m_SubID folder. Needed if mni_space=True.

    • Example: Python/MATLAB

    opt.subpath = 'path/to/m2m_ernie'
    

  • intensity: float, optional

    • Description: Target field intensity. The larger the value, the more the optimization will hit the target network, but at the cost at having higher fields outside of it. Corresponds to \(E_0\) in (Ruffini et al., 2014)

    • Default: 0.2

  • min_img_value: float ≥ 0, optional

    • Descrption: minimum image value to be considered for optimization. All image values below it are set to zero. Corresponds to \(T_{min}\) in (Ruffini et al., 2014)

    • Default: 0

  • open_in_gmsh: bool, optional

    • Descrption: Whether to open the result in Gmsh after the calculations.

    • Default: True

  • max_total_current: float, optional

    • Description: Maximum total injected current, in A

    • Default: 2e-3

  • max_individual_current: float, optional

    • Description: Maximum current injected in each electrode, in A

    • Default: 1e-3

  • max_active_electrodes: int, optional

    • Description: Maximum number of active electrodes. Leave empty if no maximum number of electrodes

    • Default: No maximum