Examples

Different examples are provided with the software to help users move from a first run to more specialized workflows. Some examples are simple scripts, while others are notebooks or full JSON-based simulation setups.

Additional repository examples

The examples/ directory in the repository contains script and notebook collections for specific subsystems. Each subdirectory is self-contained and can be run after installation. The links below point to the corresponding documentation pages for background.

  • examples/BrainGeometryAPI — building brain regions with electrodes and encapsulation layers. See Brain geometry.

  • examples/ElectrodesAPI — placing electrodes, including directed and custom models. See Electrodes.

  • examples/DielectricModelAPI — Cole-Cole and constant dielectric models, custom parameter overrides. See Dielectric properties.

  • examples/ImageAPI — MRI loading, voxel mapping, and DTI anisotropy (including the example_dti_mask.py masking demo). See Dielectric properties (Anisotropic conductivity from DTI).

  • examples/MeshAPI — mesh generation, local mesh sizes, HP refinement, and adaptive refinement. See Mesh refinement.

  • examples/StimulationSignalAPI — rectangular and biphasic pulse generation, octave-band mode. See Stimulation signals.

  • examples/MulticontactCurrents — current-controlled multicontact setups with floating and superposition approaches. See Stimulation modes.

  • examples/OptimizeSettings — exploratory optimisation of stimulation parameters. See Python scripting API.

Note

More examples are stored in the examples and the input_test_cases directories within the repository.