optixstuff.optical_elements#
Optical element abstractions (throughput, filters, field stops).
Classes#
Abstract interface for an optical element in the beam path. |
|
Base for elements with spatially uniform throughput. |
|
An optical element with wavelength-independent throughput. |
|
Wavelength-dependent throughput defined by sampled (wavelength, throughput) pairs. |
Module Contents#
- class optixstuff.optical_elements.AbstractOpticalElement[source]#
Bases:
equinox.ModuleAbstract interface for an optical element in the beam path.
Elements reduce photon flux via wavelength-dependent throughput. The ETC calls get_throughput() for scalar efficiency calculations. The simulator calls apply() to attenuate 2D photon arrays.
Both methods are abstract: use AbstractUniformElement for elements with spatially uniform throughput, which provides a default apply().
- abstractmethod get_throughput(wavelength_nm)[source]#
Fractional throughput at a given wavelength.
- Args:
wavelength_nm: Wavelength in nanometres.
- Returns:
Scalar throughput in [0, 1].
- Parameters:
wavelength_nm (jax.typing.ArrayLike)
- Return type:
jax.typing.ArrayLike
- abstractmethod apply(arr, wavelength_nm)[source]#
Apply this element to a 2D photon array.
- Args:
arr: Input photon rate array [ph/s/pixel]. wavelength_nm: Wavelength in nanometres.
- Returns:
Attenuated photon rate array, same shape as arr.
- Parameters:
arr (jaxtyping.Array)
wavelength_nm (jax.typing.ArrayLike)
- Return type:
jaxtyping.Array
- class optixstuff.optical_elements.AbstractUniformElement[source]#
Bases:
AbstractOpticalElementBase for elements with spatially uniform throughput.
Provides a default apply() that multiplies the array by the scalar throughput. Override apply() for elements with spatially varying transmission (e.g., field-dependent filter transmission maps).
- class optixstuff.optical_elements.ConstantThroughput[source]#
Bases:
AbstractUniformElementAn optical element with wavelength-independent throughput.
Useful for modeling simple attenuators, beamsplitters, or as a placeholder during instrument design studies.
- class optixstuff.optical_elements.SpectralThroughput(wavelengths_nm, throughputs)[source]#
Bases:
AbstractUniformElementWavelength-dependent throughput defined by sampled (wavelength, throughput) pairs.
Linear interpolation between samples; throughput is zero outside the defined wavelength range.
Represents any tabulated wavelength-dependent throughput in the optical path: bandpass filters, dichroics, mirror reflectivity, coating losses, ADCs, blocking filters, etc.
- Parameters:
wavelengths_nm (jaxtyping.Array)
throughputs (jaxtyping.Array)
- wavelengths_nm: jaxtyping.Array#
- throughputs: jaxtyping.Array#
- interp: interpax.Interpolator1D#