rayoptics.elem.surface module
Module for optical surface related classes
- Surface
Container of profile, extent, position and orientation information of the surface
- DecenterData
Maintains data and actions to support 4 types of position and orientation changes.
DEC: pos and orientation applied prior to surface
REV: pos and orientation applied following surface in reverse
DAR: pos and orientation applied prior to surface and then returned to initial frame
BEN: used for fold mirrors, orientation applied before and after surface
- Aperture
Circular
Rectangular
Elliptical
- class Surface(lbl: str = '', profile: SurfaceProfile | None = None, clear_apertures=None, edge_apertures=None, **kwargs)[source]
Bases:
InterfaceContainer of profile, extent, position and orientation.
- label
optional label
- profile
- property profile_cv
- property optical_power
- point_inside(x: float, y: float, fuzz: float = 1e-05) bool[source]
Returns True if the point (x, y) is inside the clear aperture.
- Parameters:
x – x coodinate of the test point
y – y coodinate of the test point
fuzz – tolerance on test pt/aperture comparison, i.e. pt fuzzy <= surface_od
- edge_pt_target(rel_dir: _Buffer | _SupportsArray[dtype[Any]] | _NestedSequence[_SupportsArray[dtype[Any]]] | complex | bytes | str | _NestedSequence[complex | bytes | str]) float[source]
Get a target for ray aiming to aperture boundaries.
- intersect(p0, d, eps=1e-12, z_dir=1.0)[source]
Intersect an
Interface, starting from an arbitrary point.- Parameters:
p0 – start point of the ray in the interface’s coordinate system
d – direction cosine of the ray in the interface’s coordinate system
z_dir – +1 if propagation positive direction, -1 if otherwise
eps – numeric tolerance for convergence of any iterative procedure
- Returns:
distance to intersection point s1, intersection point p
- Return type:
- Raises:
- class DecenterData(dtype, x=0.0, y=0.0, alpha=0.0, beta=0.0, gamma=0.0)[source]
Bases:
objectMaintains data and actions for position and orientation changes.
‘decenter’: pos and orientation applied prior to surface
‘reverse’: pos and orientation applied following surface in reverse
‘dec and return’: pos and orientation applied prior to surface and then returned to initial frame
‘bend’: used for fold mirrors, orientation applied before and after surface
- class Aperture(x_offset=0.0, y_offset=0.0, rotation=0.0, is_obscuration: bool = False)[source]
Bases:
object