NaiveFourierTransform
- class hcipy.fourier.NaiveFourierTransform(input_grid, output_grid, precompute_matrices=None)
- Bases: - FourierTransform- The naive Fourier transform (NFT). - This Fourier transform can operate on any types of coordinates, and calculates the Fourier integral using brute force. This class is written as generally as possible to act as a “ground truth” for the other Fourier transforms. As such, it has terrible performance. - Note - In almost all cases, you should not use this class. The FastFourierTransform and MatrixFourierTransform classes, if applicable, are multiple orders of magnitudes faster and use multiple orders of magnitude less memory. This class should only be used in a last resort and if you know what you are doing. - Note - The transformation matrices can be very large, quickly overwhelming any computer even for relatively small input or 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. 
- precompute_matricesboolean or None
- Whether to precompute the matrices used in the NFT. Turning this on will cache calculated matrices for future evaluations of the Fourier transform. This will use a large amount of memory. If this is None, the choice will be determined by the configuration file. 
 
- Raises:
- ValueError
- If the output grid has a different dimension than the input grid. 
 
 - Attributes Summary - The cached backward propagation matrix. - The cached forward propagation matrix. - Methods Summary - backward(field)- Returns the inverse Fourier transform of the - Fieldfield.- check_if_supported(input_grid, output_grid)- Check if the specified grids are supported by the Naive Fourier transform. - compute_complexity(input_grid, output_grid)- Compute the algorithmic complexity for the Naive Fourier transform. - forward(field)- Returns the forward Fourier transform of the - Fieldfield.- Attributes Documentation - matrix_backward
- The cached backward propagation matrix. 
 - matrix_forward
- The cached forward propagation matrix. 
 - Methods Documentation - backward(field)
- Returns the inverse Fourier transform of the - Fieldfield.- 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)
- Check if the specified grids are supported by the Naive Fourier transform. - Parameters:
- input_gridGrid
- The grid that is expected for the input field. 
- output_gridGrid
- The grid that is produced by the Naive 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)
- Compute the algorithmic complexity for the Naive Fourier transform. - Parameters:
- input_gridGrid
- The grid that is expected for the input field. 
- output_gridGrid
- The grid that is produced by the Naive 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)
- Returns the forward Fourier transform of the - Fieldfield.- Parameters:
- fieldField
- The field to Fourier transform. 
 
- Returns:
- Field
- The Fourier transform of the field.