optixstuff.disperser#

Disperser hardware descriptors for integral field spectrographs.

optixstuff owns the descriptor: the interface plus a cheap closed-form scalar/ETC face. The heavy render logic (building the forward operator) lives in coronachrome. This mirrors the coronagraph split, so jaxedith and yield tools can read IFS hardware info without importing the render engine.

Classes#

AbstractDisperser

Interface for a dispersing IFS element (lenslet array, slicer, MSA).

LensletDisperser

Lenslet-array IFS disperser (CRISPY heritage).

Functions#

_polyval_deriv(coeffs, x)

Evaluate the derivative of a descending-order polynomial at x.

Module Contents#

class optixstuff.disperser.AbstractDisperser[source]#

Bases: equinox.Module

Interface for a dispersing IFS element (lenslet array, slicer, MSA).

Only the scalar/ETC face is defined here. Render geometry lives in coronachrome and dispatches on the concrete descriptor type.

abstractmethod spectral_resolution(wavelength_nm)[source]#

Resolving power R = lambda / dlambda at the given wavelength.

abstractmethod spectral_sampling()[source]#

Detector pixels per resolution element.

abstractmethod n_pix_spread(wavelength_min_nm, wavelength_max_nm)[source]#

Detector pixels a single spaxel spectrum spans across a band.

abstractmethod throughput(wavelength_nm)[source]#

Disperser optical throughput in [0, 1] at the given wavelength.

optixstuff.disperser._polyval_deriv(coeffs, x)[source]#

Evaluate the derivative of a descending-order polynomial at x.

class optixstuff.disperser.LensletDisperser[source]#

Bases: AbstractDisperser

Lenslet-array IFS disperser (CRISPY heritage).

Config only. The render geometry (IR build) is performed by coronachrome, which reads these fields. Scalar/ETC methods derive from dispersion_coeffs + pix_per_reselt so the dispersion model is the single source of truth.

pitch_m: float#
pixsize_m: float#
angle_rad: float#
lam_ref_nm: float#
pix_per_reselt: float#
dispersion_coeffs: jax.Array#
psflet_params: jax.Array#
grid_kind: str#
n_lenslets: int#
psflet_kind: str#
detector_shape: tuple[int, int]#
throughput_value: float = 1.0#
_dispersion_px(wavelength_nm)[source]#

Spectral-axis detector offset [px] for the wavelength(s).

spectral_resolution(wavelength_nm)[source]#

R = (local px per unit log-lambda) / pixels-per-resolution-element.

spectral_sampling()[source]#

Detector pixels per resolution element.

n_pix_spread(wavelength_min_nm, wavelength_max_nm)[source]#

Spectral trace length [px] across a band, plus a PSFlet-width margin.

throughput(wavelength_nm)[source]#

Constant throughput in v1.