FresnelPropagator

class hcipy.propagation.FresnelPropagator(input_grid, distance, num_oversampling=2, zero_padding=2, refractive_index=1)

Bases: AgnosticOpticalElement

The monochromatic Fresnel propagator for scalar fields.

The Fresnel propagator is implemented as described in [Goodman2005].

[Goodman2005]

Goodman, J.W., 2005 Introduction to Fourier optics. Roberts and Company Publishers.

Parameters:
input_gridanything

This argument is ignored. The input grid is taken from the incoming wavefront.

distancescalar

The distance to propagate

num_oversamplingint

The number of times the transfer function is oversampled. Default is 2.

zero_paddingscalar

The amount of zero padding to use for the propagation. A value of one means no zero padding is applied. Default is 2.

refractive_indexscalar

The refractive index of the medium that the wavefront is propagating in.

Raises:
ValueError

If the input_grid is not regular and Cartesian.

Attributes Summary

distance

num_oversampling

refractive_index

zero_padding

Methods Summary

backward(wavefront, *args, **kwargs)

Propagate a wavefront backward through the optical element.

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

distance
num_oversampling
refractive_index
zero_padding

Methods Documentation

backward(wavefront, *args, **kwargs)

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.

forward(wavefront, *args, **kwargs)

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)

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)

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)

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.