analysis.grid_distortion
Grid Distortion Analysis
This module provides a grid distortion analysis for optical systems. This is module enables calculation of the distortion over a grid of points for an optical system.
Kramer Harrison, 2024
Classes
|
Grid distortion analysis for an optical system. |
- class GridDistortion(optic, wavelength='primary', num_points=10, distortion_type='f-tan')[source]
Grid distortion analysis for an optical system.
- Parameters:
optic (Optic) – The optical system to analyze.
wavelength (str | float | int, optional) – Wavelength for analysis. Can be ‘primary’, ‘all’, or a numeric value. Defaults to ‘primary’.
num_points (int, optional) – Number of grid points per axis. Defaults to 10.
distortion_type (str, optional) – Distortion model, either ‘f-tan’ or ‘f-theta’. Defaults to ‘f-tan’.
- num_points
Number of grid points per axis.
- Type:
int
- distortion_type
Distortion model used.
- Type:
str
- data
Computed distortion data (after running _generate_data()).
- Type:
dict
- view(fig_to_plot_on: Figure | None = None, figsize: tuple[float, float] = (7, 7), *, show: bool = True) tuple[Figure, Axes][source]
Visualizes the grid distortion analysis.
- Parameters:
fig_to_plot_on (plt.Figure, optional) – Existing figure to plot on. If None, a new figure is created. Defaults to None.
figsize (tuple, optional) – Size of the figure if a new one is created. Defaults to (7, 7) for a square plot.
show (bool) – If True (default), calls plt.show(). Set False for headless use.
- Returns:
The figure and axes objects used for plotting.
- Return type:
tuple