pado.math.fft

fft(arr_c, normalized='backward', pad_width=None, padval=0, shift=True)[source]

Compute 2D FFT of a complex tensor with optional padding and frequency shifting.

Parameters:
  • arr_c (torch.Tensor) – Complex tensor [B, Ch, H, W]

  • normalized (str) – FFT normalization mode: “backward”, “forward”, or “ortho”

  • pad_width (tuple) – Padding as (left, right, top, bottom)

  • padval (int) – Padding value (only 0 supported)

  • shift (bool) – If True, center zero-frequency component

Returns:

FFT result tensor

Return type:

torch.Tensor

Examples

>>> light = Light(dim=(1, 1, 100, 100), pitch=2e-6, wvl=500e-9)
>>> field_fft = fft(light.field)