bartorch.fft

Contents

bartorch.fft#

bartorch.fft(input, axes, *, inverse=False, unitary=False, uncentred=False)#

Fourier transform along axes, centred by default.

Parameters:
  • input (torch.Tensor)

  • axes (int or tuple of int) – Axes to transform, as indices into input.shape.

  • inverse (bool) – Transform with the positive exponent (-i).

  • unitary (bool) – Scale by one over the square root of the transformed size (-u); otherwise unnormalized.

  • uncentred (bool) – Keep the zero frequency at index zero rather than at n // 2 (-n).

Examples

>>> spectrum = fft(image, axes=(-2, -1), unitary=True)