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
- Enter durationSeconds, refreshHz, rounding. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| durationSeconds | Duration Seconds | Required. Finite number. |
| refreshHz | Refresh Hz | Required. Finite number. |
| rounding | Rounding | Required. Text; one of "floor", "ceil", "nearest". Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Object containing the calculated members; expand to inspect the fields below. | Required. Object. |
| result.frames | Frames | Calculated result member: number. |
| result.realizedSeconds | Realized Seconds | Calculated result member: number. |
| result.residualSeconds | Residual Seconds | Calculated result member: number. |
{
"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
Similar or alternative tools
- Stimulus Frame Quantization Error
Use JavaScript Math.round(timeSeconds×frameRate), divide back into seconds and return quantized-minus-requested error.
- Stimulus Frame Interval Residual
Divide their gap by refresh rate and subtract supplied target seconds.