optiland.analysis.jones_pupil

Jones Pupil Analysis

This module provides a Jones pupil analysis for optical systems.

Kramer Harrison, 2025

Classes

JonesPupil(optic[, field, wavelengths, ...])

Generates and plots Jones pupil maps.

class JonesPupil(optic: Optic, field: tuple[float, float] = (0, 0), wavelengths: str | list = 'all', grid_size: int = 65)[source]

Generates and plots Jones pupil maps.

This class computes the spatially resolved Jones matrix at the exit pupil (or image plane) as a function of normalized pupil coordinates. It visualizes the real and imaginary parts of the Jones matrix elements (Jxx, Jxy, Jyx, Jyy).

optic

Instance of the optic object to be assessed.

optic

Instance of the optic object to be assessed.

field

Field at which data is generated (Hx, Hy).

wavelengths

Wavelengths at which data is generated.

grid_size

The side length of the square grid of rays (NxN).

data

Contains Jones matrix data in a list, ordered by wavelength.

view(fig_to_plot_on: Figure | None = None, figsize: tuple[float, float] = (16, 8), *, show: bool = True) tuple[Figure, list[Axes]][source]

Displays the Jones pupil plots.

Parameters:
  • fig_to_plot_on – An existing Matplotlib figure to plot on. If None, a new figure is created. Defaults to None.

  • figsize – The figure size for the output window. Defaults to (16, 8).

  • show (bool) – If True (default), calls plt.show(). Set False for headless use.

Returns:

A tuple containing the Matplotlib figure and a list of its axes.