myogen.simulator.IntramuscularElectrodeArray.traj_mixing_fun#
- IntramuscularElectrodeArray.traj_mixing_fun(t, n_nodes, node) float[source]#
Compute mixing weight for a specific trajectory node at given time.
This function calculates the interpolation weight for a trajectory node based on the current time/position along the trajectory. Uses triangular weighting where nodes closer to the current time get higher weights.
- Parameters:
- Returns:
Mixing weight(s) for the specified node(s) at time t. Returns 0 for distant nodes, max weight 1 for closest node.
- Return type:
float or np.ndarray