Two Point Threshold Time

Resolve the threshold time on one linear segment; retain flat threshold plateaus and out-of-range thresholds as distinct conditions.

Description

Resolve the threshold time on one linear segment; retain flat threshold plateaus and out-of-range thresholds as distinct conditions.

A threshold time between two observations can be estimated by straight-line interpolation. The estimate depends on assuming a linear change between those observations.

When to use this tool

Resolve the threshold time on one linear segment; retain flat threshold plateaus and out-of-range thresholds as distinct conditions.

  • Prepare the supplied firstTime, secondTime, firstValue, secondValue, threshold fields for this operation.
  • Compare the complete example with the representation used by your own input before carrying the result into another step.

How to use the tool and how it works

  1. Enter firstTime, secondTime, firstValue, secondValue, threshold. Use the exact text syntax, units and index conventions explained below.
  2. Run the tool. If input validation fails, correct the supplied fields before interpreting any result.
  3. Read result.crossingTime, result.condition. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.

Require secondTime greater than firstTime. If values differ and the threshold lies inclusively between them, calculate firstTime plus the threshold's fractional progress times the duration. Otherwise return null with the applicable no-crossing, outside-segment or entire-plateau classification.1

Input fieldMeaning and representationAccepted input
firstTimefirst time.Finite number
secondTimesecond time.Finite number
firstValuefirst value.Finite number
secondValuesecond value.Finite number
thresholdthreshold.Finite number
Output fieldInterpretation
resultObject containing the named outputs below.
result.crossingTimeThe crossing time value under the stated formula or text convention.
result.conditionThe condition value under the stated formula or text convention.
json
{
  "input": {
    "firstTime": 0,
    "secondTime": 2,
    "firstValue": 0,
    "secondValue": 4,
    "threshold": 2
  },
  "output": {
    "result": {
      "crossingTime": 1,
      "condition": "one-linear-crossing"
    }
  }
}

Limitations and assumptions

  • Equal values at the threshold describe a whole plateau, not a unique time. No extrapolation, uncertainty estimate or additional observations are used.
  • Every declared top-level field is required and unexpected fields are rejected. Numeric inputs must be finite; ordinary text fields are bounded to 8,192 UTF-16 code units, with tighter operation-specific limits where stated.
  • Ordinary string lists have at most 128 entries of at most 128 code units each; numeric lists and matrices have separate bounded size checks. Nonfinite results and excessively large serialized outputs are rejected.
  • Indexes are zero-based and spans have an exclusive end unless explicitly stated otherwise. A valid false, null or empty-list result is distinct from malformed input.

Alternative or Complementary methods

Choose a sampling model before combining results. Earlier-sample hold, linear interpolation and index-only differences answer different questions; event cooldown, debounce and rolling limits also use different acceptance rules.

References

  1. Tool behavior and example: Two Point Threshold Time — tool.io

Similar or alternative tools

  • Threshold Time Occupancy

    Measure threshold occupancy over the observed time domain under previous-sample hold; the last sample has zero following duration.

  • Consecutive Threshold Streaks

    Tabulate sampled consecutive threshold streaks with explicit at-or-above versus strictly-below convention; no between-sample duration inference.

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies