Skip to content

Main content

Computational Physics: Spectral Mode Nyquist Sign Tool

Map one unshifted DFT bin index to a signed integer mode with an explicit even-length Nyquist sign policy; no frequency units or FFT evaluation.

Loading tool…

Description

Map a Fourier index to a signed mode.

Numerical grids and sampled modes require explicit coordinate, boundary and sign conventions. A staggered location, minimum-image gap or Nyquist label is one component of a discretization rather than a complete field solve or unique physical interpretation.

Map a Fourier index to a signed mode.

When to use this tool

Use Computational Physics: Spectral Mode Nyquist Sign when checking the stated grid-coordinate, periodic-image or sampled-mode convention.

How to use the tool and how it works

  1. Enter index, sampleCount, nyquistPolicy. 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 result. Expand result to inspect the returned fields.

Map a Fourier index to a signed mode. Require sampleCount 1..1000000 and index in [0,N); wrap indexes beyond N/2 negative and choose the even-N Nyquist sign under positive/negative policy.1

Input fieldMeaning and unitsAccepted input
indexPosition under the explicit indexing convention; inspect any missing-value sentinel.Required. Safe integer.
sampleCountSample CountRequired. Safe integer.
nyquistPolicyNyquist PolicyRequired. Text; one of "positive", "negative". Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units.
Output fieldInterpretationReturned shape
resultReturned calculated value or nested object under the stated output convention.Required. Object.
result.signedModeSigned ModeCalculated result member: number.
result.nyquistTrue only for even sampleCount and index exactly N/2.Calculated result member: boolean.
json
{
  "input": {
    "index": 4,
    "sampleCount": 8,
    "nyquistPolicy": "negative"
  },
  "output": {
    "result": {
      "signedMode": -4,
      "nyquist": true
    }
  }
}

Limitations and assumptions

  • Mode is an integer index, not physical frequency; no spectrum or transform is computed.
  • 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 the complete mesh, transform convention and boundary conditions for a consistent numerical simulation or physical interpretation.

References

  1. Calculation and input contract: computational-physics/spectral-mode-nyquist-sign — tool.io

Similar or alternative tools