Skip to content

Main content

EEG Sample Event Offset Tool

Map one supplied EEG event sample relative to an explicit sample origin/rate and sample-rounding convention.

Loading tool…

Description

Map one supplied EEG event sample relative to an explicit sample origin/rate and sample-rounding convention.

Neurophysiological research records use sample coordinates, event clocks, epoch boundaries, references, signal amplitudes, and spectral bins. Timing conversions and support shares depend on rate, origin, exclusion, and boundary policies. Arithmetic on supplied values is separate from signal detection, validated acquisition, or neurological interpretation.

Map one supplied EEG event sample relative to an explicit sample origin/rate and sample-rounding convention.

When to use this tool

Use EEG Sample Event Offset when you need this research signal, sample, event, epoch, reference, or spectral component from supplied data.

How to use the tool and how it works

  1. Enter eventSample, originSample, sampleRateHertz, sampleRounding. 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 sampleOffset, timeOffsetSeconds. Use the output convention below.

For positive sampleRateHertz accept sampleRounding exact,floor,ceil,or nearest-ties-positive. Subtract eventSample-originSample, apply that rounding policy, and return sampleOffset plus timeOffsetSeconds=sampleOffset/rate.1

Input fieldMeaning and unitsAccepted input
eventSampleFinite event sample coordinate; fractional values permitted.Required. Finite number.
originSampleInteger origin sample coordinate.Required. Safe integer.
sampleRateHertzPositive samples per second.Required. Finite number; strictly above 0.
sampleRoundingSample RoundingRequired. Text; one of "exact", "floor", "ceil", "nearest-ties-positive"; maximum UTF-16 length 8192.
Output fieldInterpretationReturned shape
sampleOffsetSample OffsetRequired. Finite number.
timeOffsetSecondsTime Offset SecondsRequired. Finite number.
json
{
  "input": {
    "eventSample": 120.4,
    "originSample": 100,
    "sampleRateHertz": 20,
    "sampleRounding": "floor"
  },
  "output": {
    "sampleOffset": 20,
    "timeOffsetSeconds": 1
  }
}

Limitations and assumptions

  • EventSample may be fractional while originSample is an integer. Exact preserves their difference rather than asserting exact acquisition timing; no trigger is detected, rate calibrated, or clinical latency interpreted.
  • 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 acquisition and the intended signal-analysis protocol for a complete assessment. Verify sample rate, coordinate origin, clock offsets, reference configuration, filtering assumptions, and observation support.

References

  1. Calculation and input contract: neurology/eeg-sample-event-offset — tool.io

Similar or alternative tools