Skip to content

Main content

Discrete Mode Frequency Fold Tool

Calculate discrete mode frequency fold from explicit caller-supplied inputs.

Loading tool…

Description

Fold an integer mode into a signed sampled frequency.

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.

Fold an integer mode into a signed sampled frequency.

When to use this tool

Use Discrete Mode Frequency Fold when checking the stated grid-coordinate, periodic-image or sampled-mode convention.

How to use the tool and how it works

  1. Enter modeIndex, sampleCount, sampleRate, positiveNyquist. 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 foldedIndex, frequency, nyquistTie. Inspect nyquistTie before interpreting the associated values.

Fold an integer mode into a signed sampled frequency. Require positive whole sampleCount and sampleRate > 0; reduce modeIndex using exact integer modulo, apply the supplied Nyquist sign and return frequency = foldedIndex*sampleRate/N.1

Input fieldMeaning and unitsAccepted input
modeIndexMode IndexRequired. Safe integer.
sampleCountSample CountRequired. Safe integer; minimum 1.
sampleRateSample RateRequired. Finite number; strictly above 0.
positiveNyquistPositive NyquistRequired. Boolean.
Output fieldInterpretationReturned shape
foldedIndexFolded IndexRequired. Safe integer.
frequencyFrequencyRequired. Finite number.
nyquistTieEven sample count with reduced index exactly N/2; sign is selected by positiveNyquist.Required. Boolean.
json
{
  "input": {
    "modeIndex": 7,
    "sampleCount": 8,
    "sampleRate": 80,
    "positiveNyquist": true
  },
  "output": {
    "foldedIndex": -1,
    "frequency": -10,
    "nyquistTie": false
  }
}

Limitations and assumptions

  • Frequency inherits sample-rate units; negative modes and exact Nyquist ties are conventions, not inferred signal content.
  • 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/discrete-mode-frequency-fold — tool.io

Similar or alternative tools