Uncertainty Propagation Through Fourier Transforms#
Real measurements come with uncertainties. Fourier transforms of real measurements should too.
fourierror propagates uncertainty through the discrete Fourier transform, giving you variances on the real and imaginary components of the result rather than a bare complex spectrum.
Two routes are available: an analytical propagation and a numerical sampling approach.
The package is built on scipp, so units and coordinates are carried through the transform — the correct “frequency” axis is derived for you from the coordinate you transform over, rather than left as bare array indices.
import fourierror
result = fourierror.analytical.dft(data, coord="time")
result["real"], result["imaginary"] # values and variances
data is a scipp.DataArray with variances; the result is a scipp.Dataset on a frequency axis.
If you’re new to scipp, the getting started guide is a good first stop.
A publication describing the propagation scheme — and guidance on when to prefer the numerical or analytical method — is in preparation.