Skip to main content

physicaloptix

PyPI Documentation Status Tests License Python 3.12+

Physical optics -- PSFs and diffraction -- for the HWO direct-imaging simulation suite.

The native grid samples a fixed sky angle at each wavelength. Pass a grid to stellar_map or source_psfs to integrate flux over its pixels, including pixels at native pitch. The curves and uniform-sky products in coro.calibration describe the train at build time. After editing the train with eqx.tree_at, use coro = coro.recalibrated() to refresh them.

What physicaloptix is

physicaloptix turns an optixstuff hardware description into point-spread functions by wave-optics propagation. It is a downstream consumer of optixstuff -- parallel to coronagraphoto (2D image simulation) and jaxEDITH (exposure-time and yield calculations) -- so optixstuff itself stays free of diffraction code.

The propagation core combines a plane-aware Field subclass of optixstuff.grids.GridArray with shared PixelGrid geometry, the continuous-FT MFT pair, the multi-scale vortex, and the OpticalPath fold with construction-time sampling gates, validated against the HWO Coronagraph Design Survey (cds_pipeline) EAC-1 AAVC to an on-axis null of 3.05e-11 (0.2 percent of the reference; the acceptance gates live in tests/validation/).

The key piece is PathCoronagraph, which implements optixstuff's AbstractImagingCoronagraph: build an OpticalPath (entrance pupil to Lyot plane), wrap it, and use it in a diskless observation. Its IWA and scalar performance curves are derived from the propagated PSFs at construction, never declared. Aperture rules and performance reduction come from optixstuff.apertures and optixstuff.performance; the sampled counterpart is yippy.Coronagraph, which implements AbstractTableCoronagraph directly. PathCoronagraph.bandpass exposes the entrance quadrature's Band, or None for an untagged field. Stellar maps support point stars; nonzero diameters raise eagerly and return NaN under tracing.

Requires a configured optical path, pupil field, and output sampling.

import physicaloptix as po
from optixstuff.grids import PixelGrid
from optixstuff import SimplePrimary

primary = SimplePrimary(circumscribed_diameter_m=6.0, collecting_area_m2=28.0)

coro = po.PathCoronagraph.from_path(
    core_path,
    pupil_field,
    primary=primary,
    reference_wavelength_nm=600.0,
    max_separation_lod=32.0,
)
target = PixelGrid.focal(npix, 0.25, primary.frame(600.0))
psf = coro.on_axis_psf(600.0, target)  # per-pixel flux-fraction Image
eta = coro.curves().evaluate("throughput", 6.0)  # derived, not declared

What physicaloptix is not

  • Not a hardware model. The telescope / coronagraph / detector description lives in optixstuff; physicaloptix consumes it.
  • Not a PSF interpolator. That is yippy's job (a sampled YIP table). physicaloptix is its functional sibling -- live propagation -- and both back the same AbstractImagingCoronagraph slot.
  • Not a scene model. Stars, planets, disks, and zodi live in skyscapes.

Architecture

Built on JAX and Equinox, physicaloptix provides:

  • The field core (physicaloptix.core) -- shared optixstuff.grids.PixelGrid (all-static, half-pixel offset, continuous-FT weights), PlaneKind-tagged Field pytrees, and one-row optixstuff.spectral.Quadrature rules for chromatic fields.
  • Propagators (physicaloptix.transforms) -- the validated cmft_fwd / cmft_bwd continuous-FT MFT pair and the plane-aware Fraunhofer wrapper (plus FullBandFraunhofer, its zero-padded FFT form on the full band), with sampling diagnostics evaluated at construction time.
  • Elements (physicaloptix.elements) -- grid-stamped SampledOptic for ingested masks and the MultiScaleVortex ladder (hcipy port; reaches the cds EAC-1 on-axis null).
  • The optical path (physicaloptix.path) -- OpticalPath, named plane-checked stages folded once, with static taps for free instrumented propagation.
  • The speckle layer -- SpeckleProcess / AnalyticSpeckleField, the linear speckle generator (E_nom, G) behind optixstuff's AbstractSpeckleField.
  • Interop (physicaloptix.interop) -- PathCoronagraph, the optixstuff AbstractImagingCoronagraph adapter, with live image propagation and rule-specific throughput, core area and leakage density from a separation sweep. The uniform-sky image and its annular means come from incoherent illumination.

Ecosystem position

flowchart TB
    optix["<b>optixstuff</b><br/>Telescope / Coronagraph / Detector / Instrument"]
    physopt["<b>physicaloptix</b><br/>Owned propagation core / diffraction<br/>OpticalPath / PathCoronagraph"]
    yippy["<b>yippy</b><br/>Sampled-YIP PSF interpolation"]
    corono["<b>coronagraphoto</b><br/>2D image simulation"]
    jaxedith["<b>jaxEDITH</b><br/>Exposure-time / yield"]

    optix --> physopt
    optix --> yippy
    physopt -- AbstractImagingCoronagraph --> corono
    physopt -- PerformanceCurves --> jaxedith
    yippy -- AbstractImagingCoronagraph --> corono

Installation

pip install physicaloptix

Status

Early development. The owned core propagates a full apodized vortex coronagraph chain (see tests/validation/), and PathCoronagraph serves it through the optixstuff interface with derived performance curves. The optical model is scalar; the chain propagates broadband on a fixed angular grid, and the yield-input-package emitter freezes it to tables.

Verification and validation

The propagation core is verified against closed-form physics in tests that run everywhere (the Airy pattern absolutely, the Mawet ideal-null theorem at the 1e-11 contrast regime, Talbot and Gaussian-beam laws, gradient correctness against finite differences) and validated against the HWO Coronagraph Design Survey EAC-1 reference to a 0.2 percent on-axis null agreement at 3e-11 contrast. The evidence, tolerances, and how to reproduce them are documented on the validation page. The deep-contrast path requires float64 (jax_enable_x64).

Metadata

Release files for physicaloptix 4.0.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for physicaloptix 4.0.0
File Size Uploaded Provenance Actions
physicaloptix-4.0.0.tar.gz 261.4 kB With provenance Details for physicaloptix-4.0.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for physicaloptix 4.0.0
File Interpreter ABI Platform Actions
physicaloptix-4.0.0-py3-none-any.whl Python 3 none any Details for physicaloptix-4.0.0-py3-none-any.whl

Total release size: 541.3 kB

Release files / physicaloptix-4.0.0.tar.gz

Download URL physicaloptix-4.0.0.tar.gz
Size 261.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c96c7057bff9c222f7b2ab1910d89587b4a2f19a7a4b761c9590f1610cf32211
BLAKE2b-256 checksum
How to use checksums
af6fa22f162972c646c080f092d34dd5438da78b4ab0e9bdb4cb12e0060eb5ce
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Release files / physicaloptix-4.0.0-py3-none-any.whl

Download URL physicaloptix-4.0.0-py3-none-any.whl
Size 280.0 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a0997f8ded673d3e16c1f5cb74d95d56e72ddeeb411f81d8e108f59e3ece3d2c
BLAKE2b-256 checksum
How to use checksums
01c36eca1d65631867a047ba9c4fadccbae1eb6faf627013f30de8ff913ea222
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

Security for physicaloptix 4.0.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for physicaloptix-4.0.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 28, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page