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 into intermediate 2-pair TI vector fields, saved for inspection only.
- The final mTI envelope is the verified K-pair modulation-depth envelope
(:func:
tit.calc.get_mTI_vectors) over all N carrier fields jointly -- not a recursive binary-tree TI-of-TI combination of the intermediate fields above (that approximation is deprecated; see :func:tit.calc.get_nTI_vectors). - Which pairs share a carrier -- and therefore beat against each other --
is explicit via
montage.channels(:class:tit.sim.config.Montage), passed through unchanged to :func:get_mTI_vectors/:func:get_TI_avg.channels=Noneis the default independent-dyad architecture below; it is not the only option (see :func:tit.calc._resolve_channels).
Example with 4 pairs (A/B/C/D), default independent-dyad grouping
(channels=None, equivalent to [([0], [1]), ([2], [3])])::
TI_AB = TI(E_A, E_B) # intermediate, inspection only
TI_CD = TI(E_C, E_D) # intermediate, inspection only
mTI = get_mTI_vectors([E_A, E_B, E_C, E_D])
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¶
- Set up BIDS output directory structure.
- Visualize electrode placement.
- Build SimNIBS SESSION (N TDCS lists), run FEM.
- Compute intermediate 2-pair TI vector fields (adjacent pairings, saved for inspection only).
- Compute final
mTI_maxfrom the verified K-pair modulation-depth envelope over all N carrier fields, grouped into carriers permontage.channels(None= one carrier per pair), plus its orientation-averaged companionTI_avgand thehf_peak/hf_sarcarrier-exposure safety maps (always over all N fields, regardless ofchannels). - 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.