Description
Wrap an integer event sample into a supplied cycle and report its shortest signed sample gap from an anchor.
Movement research distinguishes elapsed time, active time, cycle phase, measured force, and assessment-score conventions. Normalizing or remapping these quantities can help compare records when their units and definitions agree. A local arithmetic term does not by itself validate a functional assessment or an exercise program.
Wrap an integer event sample into a supplied cycle and report its shortest signed sample gap from an anchor.
When to use this tool
Use Movement Cycle Anchor Gap when you need this motion, timing, force, annotation, or score-mapping component for supplied research records.
How to use the tool and how it works
- Enter eventSample, cycleStartSample, samplesPerCycle, suppliedAnchorPhase. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read phase, signedAnchorGap. Use the output convention below.
For positive integer samplesPerCycle and a valid suppliedAnchorPhase use exact integer subtraction and modulo to wrap eventSample-cycleStartSample into phase. Return signedAnchorGap as the nearest signed displacement from the anchor, wrapping gaps beyond half a cycle.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| eventSample | Event Sample | Required. Safe integer. |
| cycleStartSample | Cycle Start Sample | Required. Safe integer. |
| samplesPerCycle | Samples Per Cycle | Required. Safe integer; minimum 1. |
| suppliedAnchorPhase | Supplied Anchor Phase | Required. Safe integer; minimum 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| phase | Phase | Required. Safe integer. |
| signedAnchorGap | Nearest signed sample displacement; exact half-cycle retains its original sign. | Required. Safe integer. |
{
"input": {
"eventSample": 12,
"cycleStartSample": 3,
"samplesPerCycle": 10,
"suppliedAnchorPhase": 1
},
"output": {
"phase": 9,
"signedAnchorGap": -2
}
} Limitations and assumptions
- Sample coordinates are integer indices, not seconds. Exact half-cycle ties retain the original displacement sign; the calculation does not detect cycles or establish a clinical movement event.
- Inputs must satisfy both the field types and the cross-field conditions above. Invalid input causes an error; a successful false flag or documented placeholder is a different result.
- Numeric calculations use binary floating point unless exact decimal-integer arithmetic is explicitly stated. No hidden measurement tolerance or decimal rounding is added; nonfinite or out-of-contract results are rejected. Signed zero is exported as zero.
Alternative or Complementary methods
Use the intended assessment or motion-analysis protocol with verified timing, units, and event annotations. A complete interpretation needs the relevant measurement properties and task context beyond this local calculation.
References
Similar or alternative tools
- Motion Repetition Phase Gap
Compare supplied research cycle phases with a positive half-cycle tie convention.
- Cycle Phase Relative Time
For positive cycleLength wrap eventAt-origin into a nonnegative phase below cycleLength and return fraction=phase/cycleLength.