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 InteractionMode(value)[source]
Bases:
Enum
enum for different interact_mode specifications
Retained to restore old files
Deprecated since version 0.4.5.
- Transmit = 1
propagate in transmission at this interface
- Reflect = 2
propagate in reflection at this interface
- class Surface(lbl='', profile=None, clear_apertures=None, edge_apertures=None, **kwargs)[source]
Bases:
Interface
Container 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
- 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:
object
Maintains 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
- property dtype