AbstractIsoscelesTrapezoidalAperture#

class optika.apertures.AbstractIsoscelesTrapezoidalAperture(*, samples_wire=101, active=True, inverted=False, transformation=None, kwargs_plot=None)[source]#

Bases: AbstractPolygonalAperture

A generalized isosceles-trapezoidal aperture.

Attributes

active

Whether the aperture is active and can clip rays.

angle

The angle between the two legs of the trapezoid.

bound_lower

The lower-left corner of the aperture's rectangular footprint

bound_upper

The upper-right corner of the aperture's rectangular footprint

inverted

Whether this object is being used as an aperture or obscuration.

kwargs_plot

Extra keyword arguments that will be used in the call to named_arrays.plt.plot() within the plot() method.

samples_wire

The default number of samples used for wire().

shape

The array shape of this object.

transformation

The transformation between the local surface coordinates and the aperture.

vertices

The vertices of the polygon representing this aperture

x_left

The \(x\) coordinate of the left base of the trapezoid.

x_right

The \(x\) coordinate of the right base of the trapezoid.

Methods

__init__(*[, samples_wire, active, ...])

clip_rays(rays)

Given a set of input rays, update the unvignetted to be False if 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])

The sequence of points representing this aperture

Inheritance Diagram

Inheritance diagram of optika.apertures.AbstractIsoscelesTrapezoidalAperture
Parameters:
clip_rays(rays)#

Given a set of input rays, update the unvignetted to be False if 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:
Return type:

None | ScalarArray[ndarray[tuple[Any, …], dtype[None | Line2D]]]

to_dxf(file, unit, transformation=None)#
Parameters:
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.

Parameters:

prefix (None | str) – an optional string, the length of which is used to calculate how much whitespace to add to the result.

Return type:

str

wire(num=None)#

The sequence of points representing this aperture

Parameters:

num (None | int) – The total number of samples that will be used to represent this wire.

Return type:

Cartesian3dVectorArray

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

property bound_upper: AbstractCartesian3dVectorArray#

The upper-right corner of the aperture’s rectangular footprint

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. If False, 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 the plot() method.

samples_wire: int = 101#

The default number of samples used for wire().

abstract property shape: dict[str, int]#

The array shape of this object.

transformation: None | AbstractTransformation = None#

The transformation between the local surface coordinates and the aperture.

property vertices: Cartesian3dVectorArray#

The vertices of the polygon representing this aperture

abstract property x_left: int | float | complex | ndarray | Quantity | AbstractScalar#

The \(x\) coordinate of the left base of the trapezoid.

abstract property x_right: int | float | complex | ndarray | Quantity | AbstractScalar#

The \(x\) coordinate of the right base of the trapezoid.