Sample Saturation Span Finder

Find sampled spans at or beyond explicit saturation limits, preserving lower versus upper sides; no hardware-clipping diagnosis.

Description

Find sampled spans at or beyond explicit saturation limits, preserving lower versus upper sides; no hardware-clipping diagnosis.

Values at a sensor's declared limits can be candidates for saturation. Contiguous lower- or upper-limit spans make those periods easier to inspect.

When to use this tool

Find sampled spans at or beyond explicit saturation limits, preserving lower versus upper sides; no hardware-clipping diagnosis.

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

Require lowerLimit below upperLimit. Label each sample lower when at or below the lower bound, upper when at or above the upper bound, and inside otherwise. Group equal labels and return only lower/upper spans.1

Input fieldMeaning and representationAccepted input
valuesvalues.List of finite numbers; bounded by the operation
lowerLimitlower limit.Finite number
upperLimitupper limit.Finite number
Output fieldInterpretation
resultObject containing the named outputs below.
result.spansThe spans list in the ordering and representation described above.
json
{
  "input": {
    "values": [
      -1,
      -1,
      0,
      2,
      2
    ],
    "lowerLimit": -1,
    "upperLimit": 2
  },
  "output": {
    "result": {
      "spans": [
        {
          "start": 0,
          "end": 2,
          "side": "lower"
        },
        {
          "start": 3,
          "end": 5,
          "side": "upper"
        }
      ]
    }
  }
}

Limitations and assumptions

  • Bounds are supplied rather than inferred from a device. Threshold contact does not prove clipping, instrument failure or the duration of a span without timestamps.
  • 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: Sample Saturation Span Finder — tool.io

Similar or alternative tools

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