surfaces.image_surface

Image Surface

This module contains the ImageSurface class, which represents an image surface in an optical system.

Kramer Harrison, 2024

Classes

ImageSurface(previous_surface, geometry, ...)

Represents an image surface in an optical system.

class ImageSurface(previous_surface: Surface | None, geometry: BaseGeometry, material_post: BaseMaterial, aperture: BaseAperture = None)[source]

Represents an image surface in an optical system.

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

  • material_pre (BaseMaterial) – The material before the surface.

  • aperture (BaseAperture, optional) – The aperture of the surface. Defaults to None.

property coating
flip()

Flips the surface, swapping materials and reversing geometry.

classmethod from_dict(data)

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()

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

property material_post: BaseMaterial | None
property material_pre: BaseMaterial | None
property previous_surface
reset()

Resets the recorded information of the surface.

set_fresnel_coating()

Sets the coating of the surface to a Fresnel coating.

set_semi_aperture(r_max: float)

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()

Returns a dictionary representation of the surface.

trace(rays: BaseRays) BaseRays

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.