analysis.pupil_aberration#
Pupil Aberration Analysis
The pupil abberration is defined as the difference between the paraxial and real ray intersection point at the stop surface of the optic. This is specified as a percentage of the on-axis paraxial stop radius at the primary wavelength.
Kramer Harrison, 2024
Classes
|
Represents the pupil aberrations of an optic. |
- class PupilAberration(optic, fields: str | list = 'all', wavelengths: str | list = 'all', num_points: int = 256)[source]#
Represents the pupil aberrations of an optic.
The pupil abberration is defined as the difference between the paraxial and real ray intersection point at the stop surface of the optic. This is specified as a percentage of the on-axis paraxial stop radius at the primary wavelength.
- Parameters:
- view(fig_to_plot_on: Figure | None = None, figsize: tuple[float, float] = (10, 3.33), *, show: bool = True) tuple[Figure, NDArray[np.object_]][source]#
Displays the pupil aberration plots for each field and wavelength.
Parameters#
- fig_to_plot_onplt.Figure, optional
An existing matplotlib Figure to plot on. If None, a new Figure is created.
- figsizetuple of float, optional
Size of the figure in inches as (width, height). Used only if a new Figure is created.
- showbool, optional
If True (default), calls plt.show(). Set False for headless use.
Returns#
- tuple[plt.Figure, list[Axes]]
The matplotlib Figure and Axes array containing the plots.
Notes#
If fig_to_plot_on is provided, the plots are embedded in the given Figure, otherwise a new Figure is created.
For each field, two subplots are created: one for aberration vs $P_y$ and one for aberration vs $P_x$.
If there are no fields to plot, a warning is printed or a message is displayed on the Figure.
A legend is added if there are plotted wavelengths.