Skip to content

signal.InstFreq.Function.instFreqSingle_relWindow

Christian d'Heureuse edited this page Jun 7, 2026 · 2 revisions

dsp-collection / signal/InstFreq / instFreqSingle_relWindow

Function: instFreqSingle_relWindow()

function instFreqSingle_relWindow(
   samples, 
   position, 
   roughtMeasuringFrequency, 
   shiftFactor, 
   relWindowWidth, 
   windowFunction): 
  | InstFreqSingleResult
  | undefined;

Defined in: signal/InstFreq.ts:43

Computes the instantaneous frequency for a single measuring frequency. For this version, the window width is specified relative to the wavelength.

Parameters

samples

Float32Array<ArrayBufferLike> | Float64Array<ArrayBufferLike>

The input signal.

position

number

The rough position where to measure the instantaneous frequency. This is the rough center position of the window.

roughtMeasuringFrequency

number

A rough value for the measuring frequency. The specified value is adjusted to the nearest value that allows a computation without subsampling. The unit of the specified frequency value is 1/samples (normalized frequency).

shiftFactor

number

Shift factor, relative to the wavelength of the frequency. This shift is used for measuring the phase delta. A reasonable value is 0.25, which corresponds to 1/4 of the wavelength of the measuring frequency.

relWindowWidth

number

Window width relative the the wavelength. An integer specifying the number of oscillation cycles of the measuring frequency to be used for the window width.

windowFunction

| WindowFunction | undefined

A window function or undefined for no windowing (i.e. for using a rectangular window).

Returns

| InstFreqSingleResult | undefined

The result structure, or undefined if the instantaneous frequency cannot be computed.

Clone this wiki locally