polyTEM.image.fft¶
Adapted from Camila Cendra’s nano package
Functions
|
Perfomrs fourier filter |
|
Generates bandpass filter of size s x s for range of frequencies (q_low, q_high). |
|
Computes fft of 2D image stored on cpu using numpy Output fft is zero centered. |
|
computes the fft based on the processor input. |
|
Fourier Ring Coefficient |
|
Generates gaussian filter in Fourier space for designated q center and bandwidth. |
|
Gets Intensity tensor for different angles at any grid point (x,y). |
|
Conversion of reciprocal space component in angstroms to spatial frequency in number of pixels. |
|
|
|
Tensor normalization operation. |
|
Plots Fourier transform and optionally radial contours of q space. |
|
Function performs azimuthal intensity integrations as function of q for selected q bandwidth. |
|
Generates 3D tensor of size (M, M, number_angles) with stack of rotated Fourier filters to be used for datacube extraction. |
|
Performs sliding psd across the input image. |
|
Spectral Signal to Noise Ratio |
|
Plots stack of figures to describe nano-FFT extraction process. |
|
Computes fft of 2D tensor using pytorch GPU implementation TENSOR FFT IS NOT ZERO CENTERED BY DEFAULT! the comment out is legacy code from camila :param tensor: 2D torch.tensor :param size: int shape of fft output size |
|
inverse FFT using pytorch implentation for GPU use :param fft: complex torch.Tensor |
|
Returns powder spectrum of 2D tensor (image) using PyTorch implementation. |