Description
Return nearest waveform event-sample index and time error.
Anesthesia-related research and training records require explicit clocks, missingness flags, exclusions and measurement references. These tools reconcile benign records, simulations or bench data; an acceptable local overlap or composition sum does not establish clinical adequacy or safe patient care. Censored observations provide bounds rather than observed event times.
Return nearest waveform event-sample index and time error.
When to use this tool
Use Anesthesia Event Marker Index when checking the stated benign record, simulation, timing or bench-measurement convention.
How to use the tool and how it works
- Enter eventTime, recordingOrigin, sampleRate. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- Read nearestIndex, errorTime. Use the output convention below.
Return nearest waveform event-sample index and time error. Require sampleRate > 0; index = round((eventTime-origin)*rate), error = index/rate-(event-origin).1
| Input field | Meaning and units | Accepted input |
|---|---|---|
| eventTime | Event Time | Required. Finite number. |
| recordingOrigin | Recording Origin | Required. Finite number. |
| sampleRate | Sample Rate | Required. Finite number; strictly above 0. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| nearestIndex | Math.round of relative time*sampleRate, with half ties toward positive infinity; negative indices are accepted. | Required. Safe integer. |
| errorTime | Rounded index/sampleRate minus the original relative event time; signed time error. | Required. Finite number. |
{
"input": {
"eventTime": 10.25,
"recordingOrigin": 10,
"sampleRate": 4
},
"output": {
"nearestIndex": 1,
"errorTime": 0
}
} Limitations and assumptions
- Half ties round toward positive infinity and negative indexes may occur; no event detection, recording bounds or clinical timing is validated.
- 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 verified source records and appropriate complete analysis for research or quality review; seek qualified medical and engineering assessment for actual clinical care or equipment decisions.
References
Similar or alternative tools
- Anesthesia Equipment Inspection Window
Return inspection due day, overdue days and grace flag.
- Anesthesia Log Clock Origin Flag
Return elapsed log time only when origin is known.