Skip to content

mTI

tit.sim.mTI

N-pair Multi-channel Temporal Interference (mTI) simulation.

Implements :class:mTISimulation, the concrete BaseSimulation subclass for multi-channel TI stimulation with an arbitrary even number of electrode pairs (4, 6, 8, ...):

  • Each pair produces one HF E-field via SimNIBS TDCS.
  • Adjacent pairs are combined via binary-tree TI recursion.
  • Intermediate TI vector fields are saved for inspection.

Example with 4 pairs (A/B/C/D)::

TI_AB = TI(E_A, E_B)
TI_CD = TI(E_C, E_D)
mTI   = TI(TI_AB, TI_CD)

See Also

BaseSimulation : Abstract base class providing the run template. TISimulation : Standard 2-pair TI variant. SimulationConfig : Configuration consumed by the simulation. run_simulation : Top-level orchestration that dispatches to this class.

mTISimulation

mTISimulation(config: SimulationConfig, montage: Montage, logger)

Bases: BaseSimulation

Run a single N-pair mTI simulation (N >= 4, even).

Pipeline
  1. Set up BIDS output directory structure.
  2. Visualize electrode placement.
  3. Build SimNIBS SESSION (N TDCS lists), run FEM.
  4. Compute intermediate TI vector fields via binary-tree pairing.
  5. Compute final mTI_max from the combined TI field.
  6. Extract GM/WM meshes, convert to NIfTI, organize outputs.
See Also

BaseSimulation : Parent class with shared setup and template run. TISimulation : Standard 2-pair variant.

Source code in tit/sim/base.py
def __init__(self, config: SimulationConfig, montage: Montage, logger):
    self.config = config
    self.montage = montage
    self.logger = logger
    self.pm = get_path_manager()
    self.m2m_dir = self.pm.m2m(config.subject_id)