Description
Reduce phaseDifference modulo period and add period to a negative remainder.
A periodic phase difference can be represented modulo one cycle or as a signed shortest difference. Half-cycle ties and sampled wingbeat ambiguity require an explicit period and boundary convention.
Reduce phaseDifference modulo period and add period to a negative remainder.
When to use this tool
Use Wing Beat Half Cycle Ambiguity when wrapping a supplied wingbeat phase difference and checking its half-cycle tie.
How to use the tool and how it works
- Enter phaseDifference, period. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read wrappedDifference, halfCycleTie. Inspect halfCycleTie before interpreting the associated values.
Require positive period. Reduce phaseDifference modulo period and add period to a negative remainder. Return wrappedDifference and halfCycleTie = (wrappedDifference === period/2), using one phase unit.1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| phaseDifference | Signed phase difference in the same unit as period, not necessarily an angle in radians. | Required. Finite number. |
| period | Positive full-cycle interval in the same unit as the time or phase coordinates. | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| wrappedDifference | Wrapped Difference | Required. Finite number. |
| halfCycleTie | Half Cycle Tie | Required. Boolean. |
{
"input": {
"phaseDifference": 5,
"period": 10
},
"output": {
"wrappedDifference": 5,
"halfCycleTie": true
}
} Limitations and assumptions
- The tie uses exact numeric equality without tolerance. Wrapping alone does not identify wingbeats, resolve sampling aliasing or determine a signed shortest phase difference.
- 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. Numeric signed-zero results are exported as zero.
Alternative or Complementary methods
Use an appropriate time-series or motion-analysis method when frequency, aliasing or physical phase needs to be estimated.
References
Similar or alternative tools
- Phenology Event Circular Day Gap
forwardGap wraps secondDay-firstDay modulo yearDays; shortestSignedGap subtracts yearDays only when forwardGap > yearDays/2.
- Assay Response Phase Gap
Compare a wrapped assay-time phase fraction with a supplied cyclic reference fraction.