AbstractIsoscelesTrapezoidalAperture#
- class optika.apertures.AbstractIsoscelesTrapezoidalAperture(*, samples_wire=101, active=True, inverted=False, transformation=None, kwargs_plot=None)[source]#
Bases:
AbstractPolygonalApertureA generalized isosceles-trapezoidal aperture.
Attributes
Whether the aperture is active and can clip rays.
The angle between the two legs of the trapezoid.
The lower-left corner of the aperture's rectangular footprint in surface coordinates.
The upper-right corner of the aperture's rectangular footprint in surface coordinates.
Whether this object is being used as an aperture or obscuration.
Extra keyword arguments that will be used in the call to
named_arrays.plt.plot()within theplot()method.The default number of samples used for
wire().The array shape of this object.
The transformation between the local surface coordinates and the aperture.
The vertices of the polygon in local coordinates.
The \(x\) coordinate of the left base of the trapezoid in local coordinates.
The \(x\) coordinate of the right base of the trapezoid in local coordinates.
Methods
__init__(*[, samples_wire, active, ...])clip_rays(rays)Given a set of input rays in surface coordinates, update the
unvignettedto beFalseif the ray is blocked by the aperture.plot([ax, transformation, components, sag])Plot the selected components onto the given axes.
to_dxf(file, unit[, transformation])to_string([prefix])Public-facing version of the
__repr__method that allows for defining a prefix string, which can be used to calculate how much whitespace to add to the beginning of each line of the result.wire([num])A sequence of points representing this aperture in surface coordinates.
Inheritance Diagram

- Parameters:
samples_wire (int)
active (bool | AbstractScalar)
inverted (bool | AbstractScalar)
transformation (None | AbstractTransformation)
kwargs_plot (None | dict)
- clip_rays(rays)#
Given a set of input rays in surface coordinates, update the
unvignettedto beFalseif the ray is blocked by the aperture.- Parameters:
rays (RayVectorArray) – The input rays to clip.
- plot(ax=None, transformation=None, components=None, sag=None, **kwargs)#
Plot the selected components onto the given axes.
- Parameters:
ax (None | Axes | ScalarArray[ndarray[tuple[Any, ...], dtype[_ScalarT]]]) – The matplotlib axes to plot onto
transformation (None | AbstractTransformation) – Any extra transformations to apply to the coordinate system before plotting
components (None | tuple[str, ...]) – Which 3d components to plot, helpful if plotting in 2d.
kwargs – Additional keyword arguments that will be passed along to
named_arrays.plt.plot()sag (None | AbstractSag)
- Return type:
None | ScalarArray[ndarray[tuple[Any, …], dtype[None | Line2D]]]
- to_dxf(file, unit, transformation=None)#
- Parameters:
file (Path)
unit (Unit)
transformation (None | AbstractTransformation)
- to_string(prefix=None)#
Public-facing version of the
__repr__method that allows for defining a prefix string, which can be used to calculate how much whitespace to add to the beginning of each line of the result.
- wire(num=None)#
A sequence of points representing this aperture in surface coordinates.
- Parameters:
num (None | int) – The total number of samples that will be used to represent this wire.
- Return type:
- active: bool | AbstractScalar = True#
Whether the aperture is active and can clip rays.
- abstract property angle: int | float | complex | ndarray | Quantity | AbstractScalar#
The angle between the two legs of the trapezoid.
- property bound_lower: AbstractCartesian3dVectorArray#
The lower-left corner of the aperture’s rectangular footprint in surface coordinates.
- property bound_upper: AbstractCartesian3dVectorArray#
The upper-right corner of the aperture’s rectangular footprint in surface coordinates.
- inverted: bool | AbstractScalar = False#
Whether this object is being used as an aperture or obscuration.
If
True, the interior of the aperture allows light to passthrough. IfFalse, the exterior of the aperture allows light to pass through.
- kwargs_plot: None | dict = None#
Extra keyword arguments that will be used in the call to
named_arrays.plt.plot()within theplot()method.
- transformation: None | AbstractTransformation = None#
The transformation between the local surface coordinates and the aperture.
- property vertices: Cartesian3dVectorArray#
The vertices of the polygon in local coordinates.