Skip to content

Main content

Experimental Psychology: Stimulus Frame Duration Rounding Tool

Quantize one stimulus duration to display frames under explicit floor/ceil/nearest-half-up policy; excludes scheduling, dropped frames and hardware timing guarantees.

Loading tool…

Description

Floor, ceil or nearest-half-up to whole frames and return realized duration and residual.

Experimental timing depends on clock origin, display refresh, exclusion rules and observation windows. Requested, quantized and actually measured times are different quantities, and a timing residual alone does not establish a psychological effect.

Floor, ceil or nearest-half-up to whole frames and return realized duration and residual.

When to use this tool

Use Experimental Psychology: Stimulus Frame Duration Rounding when you need an explicit experiment-timing or latency term.

How to use the tool and how it works

  1. Enter durationSeconds, refreshHz, rounding. Use the units and conventions below.
  2. Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
  3. Read result. Expand result to inspect the returned fields.

Require nonnegative duration and positive refreshHz, with raw frame count at most 1e9. Floor, ceil or nearest-half-up to whole frames and return realized duration and residual.1

Input fieldMeaning and unitsAccepted input
durationSecondsDuration SecondsRequired. Finite number.
refreshHzRefresh HzRequired. Finite number.
roundingRoundingRequired. Text; one of "floor", "ceil", "nearest". Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
Output fieldInterpretationReturned shape
resultObject containing the calculated members; expand to inspect the fields below.Required. Object.
result.framesFramesCalculated result member: number.
result.realizedSecondsRealized SecondsCalculated result member: number.
result.residualSecondsResidual SecondsCalculated result member: number.
json
{
  "input": {
    "durationSeconds": 0.025,
    "refreshHz": 60,
    "rounding": "nearest"
  },
  "output": {
    "result": {
      "frames": 2,
      "realizedSeconds": 0.03333333333333333,
      "residualSeconds": 0.008333333333333333
    }
  }
}

Limitations and assumptions

  • This is planned frame quantization under fixed refresh, not verified actual display timing. The selected rounding policy is explicit and duration is seconds.
  • Outputs are nested inside result. 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 calibrated presentation and response hardware and the study's analysis protocol. Check raw timestamps, censoring, exclusion policy and uncertainty before interpreting timing contrasts.

References

  1. Calculation and input contract: experimental-psychology/stimulus-frame-duration-rounding — tool.io

Similar or alternative tools