neurodec.mdt.FiberProperties#

class neurodec.mdt.FiberProperties(dictionary: dict)#

Properties of individual fibers

property id: int#

Returns the ID of the object

classmethod new(fibers: Fibers, neuromuscular_junction_min: float = 0.5, neuromuscular_junction_max: float = 0.5, tendon_1_ratio_min: float = 0.0, tendon_1_ratio_max: float = 0.0, tendon_2_ratio_min: float = 0.0, tendon_2_ratio_max: float = 0.0, velocity_min: float = 3.0, velocity_max: float = 3.0, force_computation: bool = False, random_seed: int = 0) FiberProperties#

Create new fiber properties for individual fibers

Creates new fiber properties from each fiber of a muscle. This will initiate a call to the Neurodec Myoelectric Digital Twin (MDT) API that will generate fiber properties and return their metadata.

The input values define lower and upper bounds for each of the fiber parameters. Individual fiber properties will be then randomly sampled from a uniform distribution within corresponding ranges.

Parameters
  • fibers – The fibers for which to generate the individual properties.

  • neuromuscular_junction_min – the lower bound for the neuromuscular junction location ratio (between 0 and 1).

  • neuromuscular_junction_max – the upper bound for the neuromuscular junction location ratio (between 0 and 1).

  • tendon_1_ratio_min – the lower bound for the tendon 1 ratio (between 0 and 1).

  • tendon_1_ratio_max – the upper bound for the tendon 1 ratio (between 0 and 1).

  • tendon_2_ratio_min – the lower bound for the tendon 2 ratio (between 0 and 1).

  • tendon_2_ratio_max – the upper bound for the tendon 2 ratio (between 0 and 1).

  • velocity_min – the lower bound for the action potential propagation velocity, in m/s.

  • velocity_max – the upper bound for the action potential propagation velocity, in m/s.

  • 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.

  • random_seed – A specific random seed to be used for the calculations. Changing the seed allows to create multiple instances from the same parameters.

Returns

The metadata of the new fiber properties. If another set of fiber properties with the same parameters already exits, those will be returned instead of building new ones.

property status: Status#

Returns the up-to-date status of the object, by performing an API request.

wait()#

Wait for the object to be ready