fourier_interp1d

image_registration.fft_tools.scale.fourier_interp1d(data, out_x, data_x=None, nthreads=1, use_numpy_fft=False, return_real=True)[source]

Use the fourier scaling theorem to interpolate (or extrapolate, without raising any exceptions) data.

Parameters:
datandarray

The Y-values of the array to interpolate

out_xndarray

The X-values along which the data should be interpolated

data_xndarray | None

The X-values corresponding to the data values. If an ndarray, must have the same shape as data. If not specified, will be set to np.arange(data.size)

nthreadsint

Number of threads for parallelized FFTs (if available)

use_numpy_fftbool

Use the numpy version of the FFT before any others? (Default is to use fftw3)

Returns:
The real component of the interpolated 1D array, or the full complex array
if return_real is False
Raises:
ValueError if output indices are the wrong shape or the data X array is the
wrong shape