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
- Enter index, sampleCount, nyquistPolicy. Use the units and conventions below.
- Run the tool. Correct any format, range, or cross-field input error before interpreting the output.
- 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 field | Meaning and units | Accepted input |
|---|---|---|
| index | Position under the explicit indexing convention; inspect any missing-value sentinel. | Required. Safe integer. |
| sampleCount | Sample Count | Required. Safe integer. |
| nyquistPolicy | Nyquist Policy | Required. Text; one of "positive", "negative". Implementation limit: 8192 Unicode code points and 16384 UTF-16 code units. |
| Output field | Interpretation | Returned shape |
|---|---|---|
| result | Returned calculated value or nested object under the stated output convention. | Required. Object. |
| result.signedMode | Signed Mode | Calculated result member: number. |
| result.nyquist | True only for even sampleCount and index exactly N/2. | Calculated result member: boolean. |
{
"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
Similar or alternative tools
- Spectral Derivative One Mode Factor
Return one Fourier derivative factor under an explicit complex convention.
- Discrete Mode Frequency Fold
Fold an integer mode into a signed sampled frequency.