RecruitmentThresholds#

class RecruitmentThresholds(
N: int,
recruitment_range__ratio: float,
deluca__slope: float | None = None,
konstantin__max_threshold__ratio: float = 1.0,
mode: Literal['fuglevand', 'deluca', 'konstantin', 'combined'] = 'konstantin',
) None[source]#

Bases: object

Motor unit recruitment threshold generator using physiological models.

This class computes recruitment thresholds for motor unit pools using different established models from the literature.

Generate recruitment thresholds for a pool of motor units using different models.

This class computes the recruitment thresholds (and zero-based thresholds) for a pool of N motor units according to one of several models from the literature. The distribution of thresholds is controlled by the recruitment range (RR) and, for some models, additional parameters.

Following models are available:
  • Fuglevand et al. (1993) [1]

  • De Luca & Contessa (2012) [2]

  • Konstantin et al. (2020) [3]

  • Combined model

Parameters:
  • N (int) – Number of motor units in the pool.

  • recruitment_range__ratio (float) – Recruitment range (dimensionless ratio), defined as the ratio of the largest to smallest threshold \((rt(N)/rt(1))\).

  • deluca__slope (float, optional) – Dimensionless slope parameter for the 'deluca' mode. Required if mode='deluca'. Controls the curvature of the threshold distribution. Typical values range from 0.001-100.

  • konstantin__max_threshold__ratio (float, optional) – Maximum recruitment threshold (dimensionless ratio) for the 'konstantin' mode. Required if mode='konstantin'. Sets the absolute scale of all thresholds. Default is 1.0.

  • mode (RecruitmentMode, optional) – Model to use for threshold generation. One of 'fuglevand', 'deluca', 'konstantin', or 'combined'. Default is 'konstantin'.

rt#

Recruitment thresholds for each motor unit (shape: (N,)). Values are monotonically increasing from rt[0] to rt[N-1].

Type:

RECRUITMENT_THRESHOLDS__ARRAY

rtz#

Zero-based recruitment thresholds where \(rtz[0] = 0\) (shape: (N,)). Computed as \(rtz = rt - rt[0]\), convenient for simulation.

Type:

RECRUITMENT_THRESHOLDS__ARRAY

Raises:

ValueError – If a required mode-specific parameter is not provided or if an unknown mode is specified.

Parameters:
  • N (int)

  • recruitment_range__ratio (float)

  • deluca__slope (float | None)

  • konstantin__max_threshold__ratio (float)

  • mode (Literal['fuglevand', 'deluca', 'konstantin', 'combined'])

References

Notes

fuglevandFuglevand et al. (1993) [1] exponential model
\[\begin{split}rt(i) = \\exp( \\frac{i \\cdot \\ln(RR)}{N} ) / 100\end{split}\]

where \(i = 1, 2, \\ldots, N\)

delucaDe Luca & Contessa (2012) [2] model with slope correction
\[\begin{split}rt(i) = \\frac{b \\cdot i}{N} \\cdot \\exp\\left(\\frac{i \\cdot \\ln(RR / b)}{N}\\right) / 100\end{split}\]

where \(b\) = deluca__slope, \(i = 1, 2, \\ldots, N\)

konstantinKonstantin et al. (2020) [3] model allowing explicit maximum threshold control
\[\begin{split}rt(i) &= \\frac{RT_{max}}{RR} \\cdot \\exp\\left(\\frac{(i - 1) \\cdot \\ln(RR)}{N - 1}\\right) \\\\ rtz(i) &= \\frac{RT_{max}}{RR} \\cdot \\left(\\exp\\left(\\frac{(i - 1) \\cdot \\ln(RR + 1)}{N}\\right) - 1\\right)\end{split}\]

where \(RT_{max}\) = konstantin__max_threshold__ratio, \(i = 1, 2, \\ldots, N\)

combinedA corrected De Luca model that uses the slope parameter for shape control but properly respects the RR constraint and maximum threshold like the Konstantin model
\[\begin{split}rt(i) = \\frac{RT_{max}}{RR} + \\left(\\frac{b \\cdot i}{N} \\cdot \\exp\\left(\\frac{i \\cdot \\ln(RR / b)}{N}\\right) - \\frac{RT_{max}}{RR}\\right) \\cdot \\left(\\frac{RT_{max} - RT_{max}/RR}{b \\cdot N \\cdot \\exp\\left(\\frac{i \\cdot \\ln(RR / b)}{N}\\right) - \\frac{RT_{max}}{RR}}\\right)\end{split}\]

where \(b\) = deluca__slope, \(RT_{max}\) = konstantin__max_threshold__ratio, \(i = 1, 2, \\ldots, N\)

Examples

>>> # Generate thresholds using Fuglevand model
>>> thresholds = RecruitmentThresholds(
...     N=100, recruitment_range__ratio=50.0, mode='fuglevand'
... )
>>> rt, rtz = thresholds  # Tuple unpacking works
>>> # Or access directly
>>> rt = thresholds.rt
>>> rtz = thresholds.rtz
>>>
>>> # Generate thresholds using Konstantin model with explicit max threshold
>>> thresholds = RecruitmentThresholds(
...     N=100, recruitment_range__ratio=50.0, konstantin__max_threshold__ratio=1.0, mode='konstantin'
... )
>>> rt, rtz = thresholds

Methods

__init__

Generate recruitment thresholds for a pool of motor units using different models.