Wavefront and Field#
Lentil’s Wavefront
class represents a discretely sampled electric field.
Wavefronts in Lentil are monochromatic (i.e. they represent a single
wavelength). A wavefront is defined by the following parameters:
wavelength
- The wavefront wavelengthpixelscale
- The physical sampling of the wavefront’s electric fielddiameter
- The outscribing diameter around the wavefrontfocal_length
- The focal length of the wavefront. A plane wave has an infinite focal length denoted bynp.inf
tilt
- A tuple of tilt angles about the x and y axesptype
- The plane type of the wavefront
Wavefronts are mutable through interaction with a Plane
. For more details
see How a plane affects a wavefront.
Wavefonts have several useful attributes for working with their electric field:
field
- returns the wavefront’s complex fieldintensity
- returns the intensity (modulus squared) of the wavefront’s complex fieldshape
- returns the shape of the wavefront’s complex field. If shape is()
, the wavefront is considered infinite and will inherit any finite plane shape
ptype#
A wavefront’s type (ptype
) defines how it interacts
with a Plane
. When a wavefront interacts with a plane, it inherits the plane’s
ptype
. Plane type is set automatically and unexpected behavior may
occur if it is changed.
Wavefront
support the following ptypes:
|
Wavefront has no specific type |
|
Wavefront is at a pupil plane and has a finite focal length |
|
Wavefront is at an image plane |
The rules defining when a wavefront is allowed to interact with a plane based
on ptype
are described here.
How a plane affects a wavefront#
An optical plane generally has some effect on a wavefront as it propagates
through the plane. A plane may change a propagating wavefront’s amplitude, phase,
and/or physical extent. This Plane
-Wavefront
interaction is performed by the
plane’s multiply()
method. A Plane
and Wavefront
can be
multiplied in two ways:
By calling
Plane.multiply()
directly:
>>> w1 = plane.multiply(w0)
By using the built-in multiplication operator (which in turn calls
Plane.multiply()
):
>>> w1 = plane * w0
The multiply()
method constructs a complex phasor from the plane’s
amplitude
and opd
attributes and the
Wavefront
wavelength. The plane complex phasor is then multiplied element-wise with
the wavefront’s complex data array.
Multiplication rules#
The table below outlines when a wavefront can interact with a plane based on their
ptype
and what the wavefront’s pytpe is after interaction:
Plane |
Wavefront |
||
---|---|---|---|
|
|
|
|
|
|
Not allowed |
Not allowed |
|
|
|
Not allowed |
|
|
Not allowed |
|
|
|
|
|
|
|
|
|
Field#
Lentil’s wavefront consists of two major components: electric field data and
metadata about the wavefront. Internally Wavefront
uses one or more Field
objects to store the electric field data. Users shouldn’t need to interact with
fields directly, but understanding how they are used helps to understand Lentil
better.
A field is defined by the following parameters: