AbstractSurface#

class optika.surfaces.AbstractSurface[source]#

Bases: DxfWritable, Plottable, Printable, Transformable, Shaped, AbstractLightPropagator, Generic[SagT, MaterialT, ApertureT, ApertureMechanicalT, RulingsT]

Interface describing a single optical interface.

Attributes

aperture

The region of this surface which allows light to propagate.

aperture_mechanical

The shape of the physical substrate containing this optical surface.

is_field_stop

A flag controlling whether this surface should act as the field stop for the system

is_pupil_stop

A flag controlling whether this surface should act as the pupil stop for the system

is_stop

If this surface is pupil stop or the field stop, return True.

kwargs_plot

Extra keyword arguments that will be used in the call to named_arrays.plt.plot() within the plot() method.

material

The optical material type of this surface.

name

The human-readable name of this surface.

rulings

The optional ruling profile of this surface.

sag

The sag profile of this surface.

shape

The array shape of this object.

transformation

the coordinate transformation between the global coordinate system and this object's local coordinate system

Methods

__init__()

plot([ax, transformation, components])

Plot the selected components onto the given axes.

propagate_rays(rays)

Refract, reflect, and/or diffract the given rays off of this surface

to_dxf(file, unit[, transformation])

to_string([prefix])

Public-facing version of the __repr__ method that allows for defining a prefix string, which can be used to calculate how much whitespace to add to the beginning of each line of the result.

Inheritance Diagram

Inheritance diagram of optika.surfaces.AbstractSurface
plot(ax=None, transformation=None, components=None, **kwargs)[source]#

Plot the selected components onto the given axes.

Parameters:
Return type:

dict[str, AbstractScalar]

propagate_rays(rays)[source]#

Refract, reflect, and/or diffract the given rays off of this surface

Parameters:

rays (RayVectorArray) – a set of input rays that will interact with this surface

Return type:

RayVectorArray

to_dxf(file, unit, transformation=None)#
Parameters:
to_string(prefix=None)#

Public-facing version of the __repr__ method that allows for defining a prefix string, which can be used to calculate how much whitespace to add to the beginning of each line of the result.

Parameters:

prefix (None | str) – an optional string, the length of which is used to calculate how much whitespace to add to the result.

Return type:

str

abstract property aperture: ApertureT#

The region of this surface which allows light to propagate.

abstract property aperture_mechanical: ApertureMechanicalT#

The shape of the physical substrate containing this optical surface.

abstract property is_field_stop: bool#

A flag controlling whether this surface should act as the field stop for the system

abstract property is_pupil_stop: bool#

A flag controlling whether this surface should act as the pupil stop for the system

property is_stop: bool#

If this surface is pupil stop or the field stop, return True.

abstract property kwargs_plot: None | dict#

Extra keyword arguments that will be used in the call to named_arrays.plt.plot() within the plot() method.

abstract property material: MaterialT#

The optical material type of this surface.

abstract property name: str#

The human-readable name of this surface.

abstract property rulings: RulingsT#

The optional ruling profile of this surface.

abstract property sag: SagT#

The sag profile of this surface.

abstract property shape: dict[str, int]#

The array shape of this object.

abstract property transformation: None | AbstractTransformation#

the coordinate transformation between the global coordinate system and this object’s local coordinate system