surfaces.standard_surface

Standard Surface

This module defines the Surface class, which represents a surface in an optical system. Surfaces are characterized by their geometry, materials before and after the surface, and optional properties such as being an aperture stop, having a physical aperture, and a coating. The module facilitates the tracing of rays through these surfaces, accounting for refraction, reflection, and absorption based on the surface properties and materials involved.

Kramer Harrison, 2023

Classes

Surface(previous_surface, material_post, ...)

Represents a standard refractice surface in an optical system.

class Surface(previous_surface: Surface | None, material_post: BaseMaterial, geometry: BaseGeometry, is_stop: bool = False, aperture: BaseAperture | None = None, surface_type: str | None = None, comment: str = '', interaction_model: BaseInteractionModel | None = None)[source]

Represents a standard refractice surface in an optical system.

Parameters:
  • geometry (BaseGeometry) – The geometry of the surface.

  • previous_surface (Surface) – The surface preceding this instance.

  • material_post (BaseMaterial) – The material after the surface.

  • is_stop (bool, optional) – Indicates if the surface is the aperture stop. Defaults to False.

  • aperture (BaseAperture, int, float, optional) – The physical aperture of the surface. Defaults to None. If a scalar is provided, it specifies the diameter of the lens.

  • surface_type (str, optional) – The type of surface. Defaults to None.

  • comment (str, optional) – A comment for the surface. Defaults to ‘’.

  • interaction_model (BaseInteractionModel, optional) – The interaction model for the surface. Defaults to None.

property coating
flip()[source]

Flips the surface, swapping materials and reversing geometry.

classmethod from_dict(data)[source]

Creates a surface from a dictionary representation.

Parameters:

data (dict) – The dictionary representation of the surface.

Returns:

The surface.

Return type:

Surface

is_rotationally_symmetric()[source]

Returns True if the surface is rotationally symmetric, False otherwise.

property material_post: BaseMaterial | None
property material_pre: BaseMaterial | None
property previous_surface
reset()[source]

Resets the recorded information of the surface.

set_fresnel_coating()[source]

Sets the coating of the surface to a Fresnel coating.

set_semi_aperture(r_max: float)[source]

Sets the physical semi-aperture of the surface.

Parameters:

r_max (float) – The maximum radius of the semi-aperture.

subscribe(callback: Callable) None

Register a callback to be called when this object changes.

Parameters:

callback – Zero-argument callable to invoke on change.

to_dict()[source]

Returns a dictionary representation of the surface.

trace(rays: BaseRays) BaseRays[source]

Traces the given rays through the surface.

Parameters:

rays (BaseRays) – The rays to be traced.

Returns:

The traced rays.

Return type:

BaseRays

unsubscribe(callback: Callable) None

Remove a previously registered callback.

Parameters:

callback – The callable to remove. No-op if not registered.