neurodec.mdt.Conductor#
- class neurodec.mdt.Conductor(dictionary: dict)#
A volume conductor
- property id: int#
Returns the ID of the object
- classmethod new(tetrahedra: Tetrahedra, skin_conductivity: float = 0.17, fat_conductivity: float = 0.0573, bone_conductivity: float = 0.082, muscle_conductivity: Optional[Union[float, ArrayLike]] = None, electrode_conductivity: float = 2.0, force_computation: bool = False) Conductor #
Create a new volume conductor
Creates a new volume conductor from surfaces. This will initiate a call to the Neurodec Myoelectric Digital Twin (MDT) API that will build the conductor and return its metadata in the form of a dict.
- Parameters
tetrahedra – The labelled tetrahedral mesh used to define the volume conductor.
skin_conductivity – Conductivity of skin tissue. This tissue is assumed to be isotropic and therefore only one value is required to define the conductivity tensor.
fat_conductivity – Conductivity of fat tissue. This tissue is assumed to be isotropic and therefore only one value is required to define the conductivity tensor.
bone_conductivity – Conductivity of bone tissue. This tissue is assumed to be isotropic and therefore only one value is required to define the conductivity tensor.
muscle_conductivity –
Principal conductivity components of muscle tissue. This tissue is assumed to be anisotropic in general, with the principal components being (C1, C2, C2). More precisely, the conductivity C1 is the one associated with the local direction of the fibers. The parameter muscle_conductivity can be:
A scalar Cm. In this case, it is assumed that the conductivity is isotropic, and the vector of principal components is created as (Cm, Cm, Cm).
A 2-dimensional vector in the form (C1, C2). In this case, a third value is added to complete the principal components as (C1, C2, C2).
A 3-dimensional vector in the form (C1, C2, C3). The vector is passed as-is to the API. However, a warning is issued if C2 != C3.
None: the default values (0.5, 0.1, 0.1) are used for the principal components.
electrode_conductivity – Conductivity of electrode material. This material is assumed to be isotropic and therefore only one value is required to define the conductivity tensor.
force_computation – Boolean flag that allows to bypass a status check. Normally, the API would check if an object with the requested parameters was already present in the database. If this was the case, the API would not request its computation and would simply return its identifier. By setting this flag to True, the user can bypass this logic and force the computation of the resource even if it existed already. The main reason is to allow starting a calculation again in case of unexpected errors.
- Returns
The metadata of the new conductor. If another conductor with the same parameters already exits, that one will be returned instead of building a new one.
- wait()#
Wait for the object to be ready