Skip to content

Main content

ECG Sample To Time Factor Tool

Map a supplied ECG research sample index to an explicit seconds origin without peak detection or rhythm interpretation.

Loading tool…

Description

Map a signed sample-index difference to time.

Cardiac recordings use sample indexes, time origins, event markers and observation windows. A sample-grid count, interval conversion or phase comparison operates on supplied records; it does not detect an actual heartbeat, validate an ECG or determine a clinical diagnosis.

Map a signed sample-index difference to time.

When to use this tool

Use ECG Sample To Time Factor when checking the stated cardiac-record indexing, timing, phase or coverage convention.

How to use the tool and how it works

  1. Enter sampleIndex, originSample, sampleRateHertz, suppliedTimeOrigin. 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 timeSeconds, relativeSeconds. Use the output convention below.

Map a signed sample-index difference to time. Require sampleRateHertz > 0; subtract sampleIndex-originSample exactly with integer intermediates, divide by rate for relativeSeconds and add suppliedTimeOrigin.1

Input fieldMeaning and unitsAccepted input
sampleIndexSafe integer sample coordinate; subtraction is exact before conversion to floating time.Required. Safe integer.
originSampleOrigin SampleRequired. Safe integer.
sampleRateHertzSample Rate HertzRequired. Finite number; strictly above 0.
suppliedTimeOriginSupplied Time OriginRequired. Finite number.
Output fieldInterpretationReturned shape
timeSecondsTime SecondsRequired. Finite number.
relativeSecondsRelative SecondsRequired. Finite number.
json
{
  "input": {
    "sampleIndex": 120,
    "originSample": 100,
    "sampleRateHertz": 20,
    "suppliedTimeOrigin": 5
  },
  "output": {
    "timeSeconds": 6,
    "relativeSeconds": 1
  }
}

Limitations and assumptions

  • Numeric output remains floating point; actual sampling uniformity, timestamps and ECG events are not verified.
  • 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

Inspect the actual recording, acquisition settings and event annotations; use validated analysis and qualified clinical interpretation for patient-related decisions.

References

  1. Calculation and input contract: cardiology/ecg-sample-to-time-factor — tool.io

Similar or alternative tools