Skip to content

Main content

EEG Spectral Leakage Bin Offset Tool

Off-grid spectral-bin position for a supplied sinusoidal frequency, without estimating leakage amplitude or an EEG feature.

Loading tool…

Description

Off-grid spectral-bin position for a supplied sinusoidal frequency, without estimating leakage amplitude or an EEG feature.

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.

Off-grid spectral-bin position for a supplied sinusoidal frequency, without estimating leakage amplitude or an EEG feature.

When to use this tool

Use EEG Spectral Leakage Bin 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 frequencyHz, sampleHz, fftLength. 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 continuousBin, nearestBin, fractionalOffset. Use the output convention below.

For positive sampleHz, positive integer fftLength, and frequencyHz in [0,sampleHz/2] return continuousBin=frequency*fftLength/sampleHz, nearestBin=Math.round(continuousBin), and fractionalOffset=continuous-nearest.1

Input fieldMeaning and unitsAccepted input
frequencyHzFrequency HzRequired. Finite number; minimum 0.
sampleHzPositive samples per second.Required. Finite number; strictly above 0.
fftLengthFft LengthRequired. Safe integer; minimum 1.
Output fieldInterpretationReturned shape
continuousBinContinuous BinRequired. Finite number.
nearestBinNearest integer bin by upward half-tie rounding; not clamped to the actual DFT index range.Required. Safe integer.
fractionalOffsetContinuous DFT-bin coordinate minus nearest integer bin.Required. Finite number.
json
{
  "input": {
    "frequencyHz": 10.5,
    "sampleHz": 100,
    "fftLength": 100
  },
  "output": {
    "continuousBin": 10.5,
    "nearestBin": 11,
    "fractionalOffset": -0.5
  }
}

Limitations and assumptions

  • The nearest-bin half tie rounds upward. This is nominal DFT-bin geometry, not an FFT, a measured leakage estimate, a window correction, or an EEG feature/diagnosis. At the Nyquist limit for an odd FFT length, nearestBin can exceed the highest nonnegative-frequency DFT bin; the index is not clamped.
  • 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-spectral-leakage-bin-offset — tool.io

Similar or alternative tools

  • EEG Band Power One Bin Term

    One PSD-bin overlap contribution with a supplied total-power denominator, without EEG feature classification.

  • EEG Sample Event Offset

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