Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

Phase and delay

Use this page when the relative timing of two sampled signals must be inferred from a cross spectrum with an explicit sign convention.

The scientific question

Two channels can share frequency content while differing in phase. A cross spectrum preserves their relative complex information. Interpreting that phase as a time delay requires consistent DFT signs, channel order, phase wrapping, frequency units, and a model in which a delay is meaningful.

Phase is naturally reported modulo 2π2\pi. Near frequencies where cross power or coherence is weak, phase can be numerically finite yet scientifically uninformative. At f=0f=0, conversion from phase to delay is singular.

Mathematical objects

Let X(f)X(f) and Y(f)Y(f) be Fourier transforms using the forward negative-exponent convention. Define the cross spectrum with the first channel conjugated. Swapping channel order conjugates the cross spectrum and reverses the phase sign.

Wrapped phase lies on a chosen interval such as (π,π](-\pi,\pi]. Unwrapping adds integer multiples of 2π2\pi under continuity assumptions; it is an inference about branch connection, not a neutral formatting step.

Core derivation

For the channel-order convention XYX^*Y, define:

Cxy(f)=X(f)Y(f),ϕ(f)=argCxy(f),τ(f)=ϕ(f)2πf.C_{xy}(f)=X^*(f)Y(f), \qquad \phi(f)=\arg C_{xy}(f), \qquad \tau(f) = -\frac{\phi(f)}{2\pi f}.

With the DFT sign used on the signal-axes page, a delayed second channel y(t)=x(tτ0)y(t)=x(t-\tau_0) has Y(f)=X(f)exp(2πifτ0)Y(f)=X(f)\exp(-2\pi i f\tau_0). Substitution into (1) gives ϕ=2πfτ0\phi=-2\pi f\tau_0 and hence a positive τ0\tau_0. This sign depends on both the DFT and channel-order conventions.

Phase wrapping means the direct delay is ambiguous by integer multiples of 1/f1/f. A broadband constant-delay fit should operate on a stated phase model or time-domain relation rather than independently unwrapping noisy bins without an evidence rule.

What the ecosystem already owns

JAX FFT owns FFT mechanics, and JAX owns convolution mechanics. Complex multiplication and angle evaluation are array operations; JAX does not assign channel order, phase sign, wrap interval, frequency units, or validity masks.

What Jaxstro may add

The proposed jaxstro.signal may own explicit cross-spectrum records containing channel order, DFT convention, sidedness, averaging plan, phase wrap convention, frequency units, masks, and provenance. It may provide delay conversion that fails closed at zero or unsupported frequencies.

It would not decide that phase implies causality or conceal low-information bins behind a finite delay value.

Evidence required before implementation

Required evidence would include:

Claim boundary

This page claims no implemented delay estimator, uncertainty calibration, or signal-detection result.

Connected foundations and methods

Use Signal axes, cadence, and units for the DFT sign and frequency axis, Windows and spectral leakage for finite-record leakage, and Power and cross-spectral estimation for power and cross-spectral normalization. Review Models, inference, and information for the distinction between a measured relation and an inferred model, and Sensitivity, conditioning, and identifiability for weakly identified phase and delay.