... | ... | @@ -116,40 +116,7 @@ This function can be used to directly solve the linear system in order to comput |
|
|
- **'subtract_mean' : bool**
|
|
|
In case of fitted methods, the direct solution of the EEG forward problem is average-referenced if this parameter is set true.
|
|
|
- **'source_model' : configuration**
|
|
|
The source_model configuration contains further parameters that specify the source model in a tree structure:
|
|
|
|
|
|
- **'type' : {'partial_integration', 'venant', 'subtraction', 'whitney'}**
|
|
|
The type specifies the source model that is used for the discretization of the source.
|
|
|
|
|
|
Depending on the type (except for the partial integration source model), further parameters apply.
|
|
|
For the St. Venant source model, the following parameters are relevant:
|
|
|
- **'numberOfMoments' : int**
|
|
|
- **'weightingExponent' : int**
|
|
|
- **'relaxationFactor' : double**
|
|
|
- **'mixedMoments' : int**
|
|
|
- **'referenceLength' : int**
|
|
|
- **'relaxationFactor' : int**
|
|
|
- **'initialization' : {'single_element', 'closest_vertex'}**
|
|
|
- **'weightingExponent' : int**
|
|
|
- **'restrict' : bool**
|
|
|
|
|
|
For the Whitney source model, the following parameters apply:
|
|
|
- **'faceSources' : {'all', 'none'}**
|
|
|
- **'edgeSources' : {'all', 'internal', 'none'}**
|
|
|
- **'interpolation' : {'PBO', 'MPO'}**
|
|
|
- **'referenceLength' : int**
|
|
|
- **'restricted' : bool**
|
|
|
|
|
|
for the subtraction source model, the following parameters apply:
|
|
|
- **'intorderadd' : int**
|
|
|
- **'intorderadd_lb' : int**
|
|
|
These parameters specify the integration order.
|
|
|
|
|
|
Additionally to the source model specific parameters, the UDG method requires the following parameters:
|
|
|
- **'compartment' : int**
|
|
|
The index of the compartment of the source is specified (typically brain/gray matter).
|
|
|
- **'scalePointsToBBox' : bool**
|
|
|
In order to improve the condition number of the stiffenss matrix, the local basis functions on each cut-cell are scaled to the respective bounding box if this parameter is set true.
|
|
|
This is a nested configuration that contains further parameters that specify the source model in a tree structure. A more detailed description of the parameters can be found [here](https://gitlab.dune-project.org/duneuro/duneuro/-/wikis/source-model-parameters).
|
|
|
|
|
|
### returns: -
|
|
|
|
... | ... | @@ -199,28 +166,54 @@ After computing the transfer matrix (computeEEGTransferMatrix), it is multiplied |
|
|
# MEG
|
|
|
----
|
|
|
## `setCoilsAndProjections(coils, projections)`
|
|
|
The characteristics of the MEG sensors are passed. In DUNEuro, each coil is represented as a point location and an orientation, in which the magnetic field is evaluated. Higher order integration is not supported.
|
|
|
### parameters:
|
|
|
none
|
|
|
### returns:
|
|
|
nothing
|
|
|
- **coils**
|
|
|
Positions of MEG coils
|
|
|
- **projections**
|
|
|
Orientations in which the magnetic field is evaluated (orthogonally through the coil).
|
|
|
### returns: -
|
|
|
|
|
|
----
|
|
|
## `solveMEGForward(eegSolution, config)`
|
|
|
This function can be used to directly solve the linear system as opposed to using the transfer matrix approach which is typically useful for a small number of dipoles, e.g., for visualization purposes.
|
|
|
### parameters:
|
|
|
none
|
|
|
- **eegSolution**
|
|
|
The forward solution of EEG previously computed using solveEEGForward (see above).
|
|
|
- **config**
|
|
|
Configuration specifying the source model options, which is identical to the one passed in solveEEGForward (see above).
|
|
|
|
|
|
### returns:
|
|
|
nothing
|
|
|
- **leadfield**
|
|
|
For the MEG, the integral expression for the secondary B field is computed for each sensor.
|
|
|
|
|
|
----
|
|
|
## `computeMEGTransferMatrix(config)`
|
|
|
The transfer matrix is computed, which is especially useful if the number of sources outnumbers the sensors, which is usually the case in source analysis applications.
|
|
|
### parameters:
|
|
|
none
|
|
|
- **config**
|
|
|
Configuration specifying different options for the numerical computation.
|
|
|
|
|
|
These options are:
|
|
|
- **reduction: double**
|
|
|
The relative reduction of the solver
|
|
|
|
|
|
### returns:
|
|
|
nothing
|
|
|
- **transferMatrix**
|
|
|
The MEG transfer matrix
|
|
|
|
|
|
|
|
|
----
|
|
|
## `applyMEGTransfer(transferMatrix, dipoles, config)`
|
|
|
After computing the transfer matrix (computeMEGTransferMatrix), it is multiplied with the right hand side.
|
|
|
### parameters:
|
|
|
none
|
|
|
- **transferMatrix**
|
|
|
The transfer matrix computed using computeMEGTransferMatrix.
|
|
|
- **dipoles**
|
|
|
The dipoles defined by their positions and moments
|
|
|
- **config**
|
|
|
Configuration specifying the source model options, which is identical to the one passed in solveEEGForward (see above).
|
|
|
|
|
|
### returns:
|
|
|
nothing |
|
|
- **leadfield**
|
|
|
For the MEG, the integral expression for the secondary B field is computed for each sensor. |