For a detailed introduction on the software toolbox DUNEuro, see (Schrader et al., 2021). In order to solve the EEG or MEG forward problems with DUNEuro, you can use the MATLAB or Python bindings. A description of the functions that you can call and the parameters can be found in the Wiki. Basic examples for the construction of the driver, the main user interface of DUNEuro, are shown below using the Python and MATLAB bindings.
Python bindings are optional and supported through the additional module duneuro-py
. For generating python bindings, we use the pybind11 library ( GitHub ) which is included in duneuro-py
as a git submodule.
import duneuro as dp
config = {
'type' : 'fitted',
'solver_type' : 'cg',
'element_type' : 'tetrahedron',
'volume_conductor' : {
'grid.filename' : 'path/to/your/grid.msh',
'tensors.filename' : 'path/to/your/tensors.txt'
}
}
driver = dp.MEEGDriver3d(config)
Matlab bindings are optional and supported through the additional module duneuro-matlab
.
config = []
config.type' = 'fitted';
config.solver_type' = 'cg';
config.element_type' = 'tetrahedron';
config.volume_conductor.grid.filename' = 'path/to/your/grid.msh';
config.volume_conductor.tensors.filename' = 'path/to/your/tensors.txt';
driver = duneuro_meeg(config)