physical_apertures.radial#
Radial Aperture Module
This module contains the RadialAperture class, which represents a radial aperture that clips rays based on their distance from the origin.
Kramer Harrison, 2025
Functions
|
Normalize a raw aperture spec (None, number, or BaseAperture). |
Classes
|
Represents a radial aperture that clips rays based on their distance from the origin. |
- class RadialAperture(r_max: float, r_min: float = 0)[source]#
Represents a radial aperture that clips rays based on their distance from the origin.
- Variables:
- contains(x, y)[source]#
Checks if the given point is inside the aperture.
- Parameters:
x (np.ndarray) – The x-coordinate of the point.
y (np.ndarray) – The y-coordinate of the point.
- Returns:
- Boolean array indicating if the point is inside the
aperture
- Return type:
np.ndarray
- property extent#
Returns the extent of the aperture.
- Returns:
The extent of the aperture in the x and y directions.
- Return type:
- classmethod from_dict(data)[source]#
Create an aperture from a dictionary representation.
- Parameters:
data (dict) – The dictionary representation of the aperture.
- Returns:
The aperture object.
- Return type:
- scale(scale_factor)[source]#
Scales the aperture by the given factor.
- Parameters:
scale_factor (float) – The factor by which to scale the aperture.
- to_dict()[source]#
Convert the aperture to a dictionary.
- Returns:
The dictionary representation of the aperture.
- Return type: