ZoomFastFourierTransform

class hcipy.fourier.ZoomFastFourierTransform(input_grid, output_grid)[source]

Bases: FourierTransform

A Zoom Fast Fourier transform (ZoomFFT) object.

This Fourier transform is a specialization of the Chirp Z-transform. It requires both the input and output grid to be regularly spaced in Cartesian coordinates. However, contrary to the Fast Fourier Transform (FFT), the spacing can be arbitrary and a small region of Fourier space can be efficiently evaluated.

The ZoomFFT is asymptotically faster than a Matrix Fourier Transform (MFT) in cases where both input and output grids are large, typically at 1k x 1k or bigger in each grid. It also supports arbitrary dimenionality of the input and output grids.

Parameters:
input_gridGrid

The grid that is expected for the input field.

output_gridGrid

The grid that is produced by the Fourier transform.

Raises:
ValueError

If the input grid is not separated in Cartesian coordinates, if it’s not one- or two- dimensional, or if the output grid has a different dimension than the input grid.

Methods Summary

backward(field)

Returns the inverse Fourier transform of the Field field.

check_if_supported(input_grid, output_grid)

Check if the specified grids are supported by the Zoom Fast Fourier transform.

compute_complexity(input_grid, output_grid)

Compute the algorithmic complexity for the Zoom Fast Fourier transform.

forward(field)

Returns the forward Fourier transform of the Field field.

Methods Documentation

backward(field)[source]

Returns the inverse Fourier transform of the Field field.

Parameters:
fieldField

The field to inverse Fourier transform.

Returns:
Field

The inverse Fourier transform of the field.

classmethod check_if_supported(input_grid, output_grid)[source]

Check if the specified grids are supported by the Zoom Fast Fourier transform.

Parameters:
input_gridGrid

The grid that is expected for the input field.

output_gridGrid

The grid that is produced by the Zoom Fast Fourier transform.

Raises:
ValueError

If the grids are not supported. The message will indicate why the grids are not supported.

classmethod compute_complexity(input_grid, output_grid)[source]

Compute the algorithmic complexity for the Zoom Fast Fourier transform.

Parameters:
input_gridGrid

The grid that is expected for the input field.

output_gridGrid

The grid that is produced by the Zoom Fast Fourier transform.

Returns:
AlgorithmicComplexity

The algorithmic complexity for this Fourier transform.

Raises:
ValueError

If the grids are not supported. The message will indicate why the grids are not supported.

forward(field)[source]

Returns the forward Fourier transform of the Field field.

Parameters:
fieldField

The field to Fourier transform.

Returns:
Field

The Fourier transform of the field.