FraunhoferPropagator
- class hcipy.propagation.FraunhoferPropagator(input_grid, output_grid, focal_length=1)[source]
Bases:
AgnosticOpticalElementA monochromatic perfect lens propagator.
This implements the propagation of a wavefront through a perfect lens. The wavefront is assumed to be exactly in the front focal plane of the lens and is propagated to the back focal plane. The implementation follows [Goodman2005].
[Goodman2005]Goodman, J.W., 2005 Introduction to Fourier optics. Roberts and Company Publishers.
- Parameters:
- input_gridGrid
The grid on which the incoming wavefront is defined.
- output_gridGrid
The grid on which the outgoing wavefront is to be evaluated.
- focal_lengthscalar
The focal length of the lens system.
Attributes Summary
Methods Summary
backward(wavefront, *args, **kwargs)Propagate a wavefront backward through the optical element.
closest_fft_wavelength(target_wavelength)Find the wavelength closest to target_wavelength for which the propagation could be performed with a Fast Fourier Transform.
forward(wavefront, *args, **kwargs)Propagate a wavefront forward through the optical element.
get_input_grid(output_grid, wavelength)Calculate a best guess for the input grid given an output grid and wavelength.
get_output_grid(input_grid, wavelength)Calculate a best guess for the output grid given an input grid and wavelength.
make_instance(instance_data, input_grid, ...)Make an instance for this specific input_grid, output_grid, wavelength.
Attributes Documentation
- focal_length
Methods Documentation
- backward(wavefront, *args, **kwargs)[source]
Propagate a wavefront backward through the optical element.
A backward propagation is a literal backward propagation through the element. It is not (in general) the inverse of the forward propagation, except in cases where energy is conserved.
This function will be implemented by the derived class.
- Parameters:
- wavefrontWavefront
The wavefront to propagate.
- Returns:
- Wavefront
The propagated wavefront.
- closest_fft_wavelength(target_wavelength)[source]
Find the wavelength closest to target_wavelength for which the propagation could be performed with a Fast Fourier Transform.
Note
A Fast Fourier Transform is not necessarily used for the returned wavelength; the transform to use is decided by
make_fourier_transform(). The returned wavelength only guarantees that an FFT is a valid option, and will be used if it is estimated to be the fastest.- Parameters:
- target_wavelengthscalar or array_like
The wavelength(s) of interest.
- Returns:
- Array
The wavelength(s) closest to target_wavelength that can be propagated with an FFT.
- Raises:
- ValueError
If appropriate wavelengths could not be found.
- forward(wavefront, *args, **kwargs)[source]
Propagate a wavefront forward through the optical element.
This will be implemented by the derived class.
- Parameters:
- wavefrontWavefront
The wavefront to propagate.
- Returns:
- Wavefront
The propagated wavefront.
- get_input_grid(output_grid, wavelength)[source]
Calculate a best guess for the input grid given an output grid and wavelength.
This function is intended to be implemented by a derived class.
- Parameters:
- output_gridGrid
The output grid.
- wavelengthscalar
The wavelength.
- Returns:
- Grid
The best-guess input grid based on the given output grid and wavelength.
- get_output_grid(input_grid, wavelength)[source]
Calculate a best guess for the output grid given an input grid and wavelength.
This function is intended to be implemented by a derived class.
- Parameters:
- input_gridGrid
The input grid.
- wavelengthscalar
The wavelength.
- Returns:
- Grid
The best-guess output grid based on the given input grid and wavelength.
- make_instance(instance_data, input_grid, output_grid, wavelength)[source]
Make an instance for this specific input_grid, output_grid, wavelength.
This function is intended to be implemented by a derived class. Any properties evaluated for the instance can be stored into the instance_data object which is stored in the internal cache.
- Parameters:
- instance_dataInstanceData
An object storing all data for this instance. This object can be modified this function.
- input_gridGrid or None
The input grid.
- output_gridGrid or None
The output grid.
- wavelengthscalar or None
The wavelength.