Python Library Documentation

SimNIBS main programming language is Python. Here you can see documentation for the main modules used in SimNIBS.

I/O Functions

read_msh

Reads a gmsh ‘.msh’ file

write_msh

Writes a gmsh ‘msh’ file

read_freesurfer_surface

Function to read FreeSurfer surface files, based on the read_surf.m script by Bruce Fischl

write_freesurfer_surface

Writes a FreeSurfer surface Only the surfaces (triangles) are writen to the FreeSurfer surface file

read_gifti_surface

Reads a gifti surface

read_curv

Reads a freesurfer .curv file

write_curv

Writes a freesurfer .curv file

read_stl

write_geo_spheres

Writes a .geo file with spheres in specified positions

write_geo_text

Writes a .geo file with text in specified positions

Mesh Classes

Msh

class to handle the meshes.

Nodes

class to handle the node information:

Elements

Mesh elements.

NodeData

Data (scalar, vector or tensor) defined in mesh nodes.

ElementData

Data (scalar, vector or tensor) defined in mesh elements.

Transformations

subject2mni_coords

Warps a set of coordinates in subject space to MNI space

mni2subject_coords

Warps a set of coordinates in MNI space to subject space

eeg_positions

Returns a directory with EEG electrode positions

subject_atlas

Loads a brain atlas based of the FreeSurfer fsaverage template

Utilities

templates

Defines the Templates for file names used in SimNIBS

get_atlas

Loads a brain atlas based of the FreeSurfer fsaverage template

SubjectFiles

Class to find files for a given subject