myogen.simulator.IntramuscularElectrodeArray.set_position#
- IntramuscularElectrodeArray.set_position(position__mm, orientation__rad)[source]#
Set the position and orientation of the intramuscular electrode array.
This method defines the spatial placement and angular orientation of the electrode array within the muscle volume. The array is first oriented according to the specified rotations and then translated to the target position.
Coordinate System: - x-axis: radial direction (outward from muscle center) - y-axis: circumferential direction (around muscle) - z-axis: longitudinal direction (along muscle fibers)
Rotation Order: Applied as: Roll (x) → Pitch (y) → Yaw (z) using Rodrigues rotation
- Parameters:
position__mm (
tuple[float
,float
,float]
) – Center position of the electrode array in mm (x, y, z coordinates). This defines where the array center is placed within the muscle.orientation__rad (
tuple[float
,float
,float]
) – Orientation angles in radians (roll, pitch, yaw). - Roll: rotation around x-axis (radial tilt) - Pitch: rotation around y-axis (circumferential tilt) - Yaw: rotation around z-axis (longitudinal rotation)
- Return type:
None
Notes
Position and orientation changes affect all subsequent trajectory calculations. The electrode positions are recalculated based on the new transformation.
Examples
>>> # Place array at muscle center with 45° yaw rotation >>> array.set_position( ... position__mm=(0.0, 0.0, 10.0), ... orientation__rad=(0.0, 0.0, np.pi/4) ... )
See also
set_linear_trajectory
Define trajectory movement parameters
rodrigues_rot
Rodrigues rotation implementation