polyTEM.image.fft.tensor_psd

polyTEM.image.fft.tensor_psd(tensor, size=512)

Returns powder spectrum of 2D tensor (image) using PyTorch implementation. NOTE: location of operation (GPU or CPU) is determined by location of input tensor. Send tensor to GPU prior to using this function to perform operations in GPU (i.e. tensor.to(cuda)) :param tensor: 2D tensor (image) :param s: output size of FFT (s x s). tensor is padded with zeros prior to performing FFT operation :param to specified output size.:

Returns:

powder spectra (real^2 + complex^2) tensor of size (s x s) with Fourier Transform.

DC frequency component is set in center of tensor.

Return type:

fft