Consecutive Threshold Streaks

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

Description

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

Consecutive threshold streaks group adjacent samples that all pass the same comparison. Their lengths are sample counts rather than elapsed time.

When to use this tool

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

  • Prepare the supplied values, threshold, atOrAbove 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 values, threshold, atOrAbove. 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.streaks. Interpret false, null and empty lists using the distinctions below; they can be valid outputs.

Choose values at or above threshold when atOrAbove is true, or strictly below it otherwise. Group consecutive passing samples and return their half-open bounds and count.1

Input fieldMeaning and representationAccepted input
valuesvalues.List of finite numbers; bounded by the operation
thresholdthreshold.Finite number
atOrAboveExplicit choice for at or above; supply a boolean rather than a text label.true or false
Output fieldInterpretation
resultObject containing the named outputs below.
result.streaksThe streaks list in the ordering and representation described above.
json
{
  "input": {
    "values": [
      0,
      2,
      2,
      0,
      3
    ],
    "threshold": 2,
    "atOrAbove": true
  },
  "output": {
    "result": {
      "streaks": [
        {
          "start": 1,
          "end": 3,
          "count": 2
        },
        {
          "start": 4,
          "end": 5,
          "count": 1
        }
      ]
    }
  }
}

Limitations and assumptions

  • The two choices partition exact threshold equality differently. No timestamps, minimum streak length, tolerance or statistical significance are inferred.
  • 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: Consecutive Threshold Streaks — tool.io

Similar or alternative tools

  • Threshold Downcrossing Indexes

    Find down crossings from strictly above to the threshold-or-beyond; equality plateaus do not repeatedly trigger.

  • Threshold Time Occupancy

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

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