geometries.plane_grating#
Plane Geometry
The Plane geometry represents an infinite plane in two dimensions. The surface is defined as an XY plane with z=0 for all points. Recall that surfaces are always defined in the local coordinate system of the geometry.
Kramer Harrison, 2024
Classes
|
An infinite plane geometry. |
- class PlaneGrating(coordinate_system, grating_order, grating_period, groove_orientation_angle)[source]#
An infinite plane geometry.
- Parameters:
cs (CoordinateSystem) – The coordinate system of the plane geometry.
- distance(rays)[source]#
Find the propagation distance to the plane geometry.
- Parameters:
rays (RealRays) – The rays for which to calculate the distance to the plane.
- Returns:
An array of propagation distances from each ray’s current position to the plane along the ray’s direction.
- Return type:
be.ndarray
- flip()[source]#
Flip the geometry.
For a plane, this operation does nothing as its geometry is unchanged by flipping.
- globalize(rays)#
Convert rays from the local coordinate system to the global coordinate system.
- Parameters:
rays (RealRays) – The rays to convert.
- localize(rays)#
Convert rays from the global coordinate system to the local coordinate system.
- Parameters:
rays (RealRays) – The rays to convert.
- sag(x=0, y=0)[source]#
Calculate the surface sag of the plane geometry.
- Parameters:
- Returns:
The surface sag of the plane at the given point(s), which is always 0.
- Return type:
be.ndarray or float
- scale(scale_factor: float)[source]#
Scale the geometry parameters.
- Parameters:
scale_factor (float) – The factor by which to scale the geometry.
- set_radius(value: float) None#
Set the radius of curvature.
- Parameters:
value (float) – The new radius of curvature.
- Raises:
AttributeError – If the geometry type does not support setting a radius.
- surface_normal(rays)[source]#
Find the surface normal of the plane geometry at the given points.
- Parameters:
rays (RealRays) – The rays, positioned at the surface, for which to calculate the surface normal. This argument is used to determine the shape of the output arrays.
- Returns:
A tuple containing three arrays (nx, ny, nz) representing the x, y, and z components of the surface normals. For a plane z=0 in local coordinates, this will be (0, 0, 1) for all points, broadcast to the shape of the input rays.
- Return type:
tuple[be.ndarray, be.ndarray, be.ndarray]
- to_dict()[source]#
Convert the plane geometry to a dictionary.
- Returns:
The dictionary representation of the plane geometry.
- Return type:
- update_normalization(semi_aperture: float) None#
Update the normalization attributes of the geometry based on its defined normalization_mode (‘auto’ or ‘manual’). Base geometry generally does not maintain a normalization radius.
- Parameters:
semi_aperture (float) – The current semi-aperture of the surface.