TDCSLEADFIELD

Describes the simulations for a Leadfield. Required for optimization

Initialization

  • Python

    from simnibs import sim_struct
    tdcs_lf = sim_struct.TDCSLEADFIELD()
    

  • MATLAB

    tdcs_lf = sim_struct('TDCSLEADFIELD');
    

Attributes

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

    • Desctiption Name of head mesh file (subID.msh file)

    • Example: Python/MATLAB

    tdcs_lf.fnamehead = 'ernie.msh'
    

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

    • Desctiption Name of output folder

    • Example: Python/MATLAB

    tdcs_lf.pathfem = 'tdcs_leadfield/'
    

  • field: ‘E’ or ‘J’, optional

    • Description: Whether to calculate the electric field ‘E’ or current density ‘J’.

    • Default: ‘E’

  • eeg_cap: string (Python)/character array (MATLAB), optional

    • Description: Name of .csv file with EEG electrode positions.

    • Default: Automatically finds the file subpath/eeg_positions/EEG10-10_UI_Jurak_2007.csv based on fnamehead or subpath

    • Note: Only needs to be set by the user if not using the standard .csv cap file.

  • map_to_surf: bool, optional

    • Description: Whether to map the fields to the middle gray matter surface.

    • Default: True

    Note

    Does not work for headreco models ran with the --no-cat option.

  • tissues: list (python) or array (MATLAB), optional

    • Description: Tissues numbers of where to record the electric field, in addition to map_to_surf. Mixing surfaces and volumes is not allowed.

    • Default: [1006] (i.e. eye surfaces)

    • Example: Python

    # Example: Record electric fields in gray and white matter
    tdcs_lf.tissues = [1, 2]
    

  • electrode: ELECTRODE structure or list/array of ELECTRODE structures, optional

    • Description: Electrodes to be used. Typically small round electrodes. There are 3 ways to set this variable:

      • ELECTRODE structure: Use the same electrode shape for each electrode defined in the cap

      • list of ELECTRODE structures: Each electrode in the cap file will have the shape of the corresponding entry in the list

      • list of ELECTRODE structures and eeg_cap set to None (Python only): will use the centre and pos_ydir attributes of the electrodes to place them. This allows to set up electrodes on your own, without using a eeg cap provided by SimNIBS.

    • Default: Use 1 x 1cm round electrodes with 4mm thickness

  • cond: list/array of COND structures (Python/MATLAB), optional

    Follow this link.

  • anisotropy_type: ‘scalar’, ‘vn’, ‘dir’ or ‘mc’, optional

    Follow this link.

  • aniso_maxratio: float

    Follow this link.

  • aniso_maxcond: float

    Follow this link.

  • fname_tensor:string (Python)/character array (MATLAB), optional

    • Description: Name of NifTi file with conductivity tensors

    • Default: Automatically finds the file d2c_subID/dti_results_T1space/DTI_conf_tensor.nii.gz based on fnamehead.

    • Note: Only needed for simulations with anisotropic conductivities. And only needs to be set by the user if a file other than the above is to be used.