pyoptools.raytrace.surface.aperture module

class pyoptools.raytrace.surface.aperture.Aperture

Bases: Plane

Class to define a surface with an aperture.

The Aperture class is used to define stops in an optical system. It represents a surface that has both an external shape and an internal shape, which defines the aperture (hole) in the surface.

Parameters:
  • shape (Shape, optional) – An instance of a Shape subclass that defines the external shape of the stop. This parameter is inherited from the Plane class and passed through to it.

  • ap_shape (Shape, optional) – An instance of a Shape subclass that defines the internal shape of the stop (the aperture shape). This parameter specifies the shape of the hole in the surface.

Examples

Creating an aperture surface with a rectangular external shape and a circular aperture:

ap = Aperture(shape=Rectangular(size=(60, 60)), ap_shape=Circular(radius=2.5))

Notes

To create a stop component, it is recommended to use the Stop class from the comp_lib module. The Stop class creates the aperture surface and encapsulates it in a component that can be used within a System.

ap_shape
propagate(ri, ni, nr)

Calculate the refracted ray on a surface.

This method calculates the ray refracted (or both refracted and reflected rays) on a surface.

Parameters:
  • incident_ray (Ray) – The incident ray, which must be in the coordinate system of the surface.

  • ni (double) – The refractive index of the incident medium.

  • nr (double) – The refractive index of the refracted medium.

Returns:

A list containing the rays resulting from the ray-surface interaction.

Return type:

list