neurodec.mdt.FiberBasis#
- class neurodec.mdt.FiberBasis(dictionary: dict)#
Basis (leadfields/transfer function) for the fibers of a single muscle
- property id: int#
Returns the ID of the object
- classmethod new(fibers: Fibers, forward_solution: ForwardSolution, force_computation: bool = False) FiberBasis #
Create new fiber basis for a single muscle
Creates new fiber basis for the fibers of a muscle. This will initiate a call to the Neurodec Myoelectric Digital Twin (MDT) API that will generate the fiber basis and return their metadata.
- Parameters
fibers – The fibers for which to generate the motor units.
forward_solution – The forward solution of the volume conductor where the fibers live.
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 fiber basis. If another fiber basis with the same parameters already exits, it will be returned instead of building a new one.
- wait()#
Wait for the object to be ready