Skip to main content

coronachrome

coronachrome is a JAX lenslet integral-field-spectrograph (IFS) forward model and spectral extractor for high-contrast imaging, built for the Habitable Worlds Observatory (HWO) simulation suite.

Given a multi-wavelength focal-plane datacube (for example from coronagraphoto) and a hardware descriptor (an optixstuff.LensletDisperser), coronachrome compiles the instrument geometry into a single sparse linear operator, renders the dispersed IFS detector image of per-lenslet micro-spectra, and inverts the same operator to recover per-spaxel spectra with calibrated uncertainties. Everything is JAX-native: JIT-compilable, GPU-capable, and differentiable end to end.

Features

  • Compiled forward model: the lenslet grid, dispersion polynomial, and pixel-integrated PSFlets (Gaussian, Moffat, or tabulated templates) become one sparse matrix-vector product, with no per-lenslet loops at runtime.
  • Derived spatial sampling: the focal-plane pixels per lenslet follow from the descriptor's on-sky pitch and the cube plate scale, with build-time coverage and Nyquist diagnostics, rather than from a free knob.
  • Nyquist spectral grids: helpers implement the n = ceil(R ln(lam2 / lam1)) channel rule, log-spaced channel grids, and flux-conserving rebinning from an oversampled render grid.
  • PSFlet template packs: a documented npz format carries pixel-integrated PSFlet templates (per field anchor and wavelength, with optional wavecal centroid corrections) from any generator, such as a wave-optics propagation of the lenslet train, into the forward model.
  • Linear extraction with error bars: a matched filter, a matrix-free noise-weighted least-squares solve, and the per-spaxel Gauss-Markov covariance whose diagonal gives per-wavelength uncertainties.
  • One operator everywhere: the extraction exports the same H the simulation used, so simulation studies and data reduction share a single forward model.

Installation

pip install coronachrome

Quick example

import jax.numpy as jnp
from optixstuff import LensletDisperser

from coronachrome import IFSRenderer, build_ir, lstsq, spectral_grid

disperser = LensletDisperser(
    pitch_m=174e-6,
    pixsize_m=13e-6,
    angle_rad=0.4636,
    lam_ref_nm=660.0,
    pix_per_reselt=2.0,
    dispersion_coeffs=jnp.array([100.0, 0.0]),
    psflet_params=jnp.array([0.7]),
    psflet_ref_nm=660.0,
    grid_kind="square",
    n_lenslets=8,
    psflet_kind="gaussian",
    detector_shape=(256, 256),
    sky_pitch_arcsec=0.014,
)

lam, _ = spectral_grid(resolving_power=50.0, lam_min_nm=620.0, lam_max_nm=700.0)
ir = build_ir(disperser, lam, fp_shape=(64, 64), fp_pixel_scale_arcsec=0.007)
renderer = IFSRenderer(ir)

cube = jnp.ones((lam.shape[0], 64, 64))  # focal-plane rate maps
detector = renderer.forward_spmv(cube)  # dispersed micro-spectra
spectra = lstsq(renderer, detector)  # per-spaxel extraction

Documentation

Full documentation, including the mathematical formulation, the sampling contracts, the PSFlet template pack format, and the CRISPY heritage mapping, lives at coronachrome.readthedocs.io.

Heritage and roadmap

coronachrome is a JAX reimplementation of the forward model in CRISPY, the WFIRST/Roman CGI IFS simulator, generalized to configurable dispersion laws and extended with differentiability and an analytic extraction covariance. Planned directions include an image-slicer geometry (a second build_ir registration), a regularized positivity and total-variation extractor, and physically propagated PSFlet template packs. See the documentation roadmap page for detail.

Metadata

Release files for coronachrome 1.1.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 coronachrome 1.1.0
File Size Uploaded
coronachrome-1.1.0.tar.gz 218.4 kB Details

Built distribution (wheel)

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

Total release size: 262.6 kB

Release files / coronachrome-1.1.0.tar.gz

Download URL coronachrome-1.1.0.tar.gz
Size 218.4 kB
Tags Source
SHA-256 checksum
How to use checksums
c8c093a7edf94f0642a5d894627a7f0bfe84a71dc504a5f3181f7889d38b2c79
BLAKE2b-256 checksum
How to use checksums
2c91645741465b4f1bd33a10f17f664280a67e2f8f38f485e992f0a7a7ce189a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 29, 2026.

Transparency log

Release files / coronachrome-1.1.0-py3-none-any.whl

Download URL coronachrome-1.1.0-py3-none-any.whl
Size 44.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
362caf59e781b18eab6ce530695dce921e522fabab1c7849c6a4798c63610941
BLAKE2b-256 checksum
How to use checksums
e7f56a20b3f0eedc2db1237a9f6abde7036afa60d13928fc6eca13e8e1eb523b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

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 Sep 29, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.1.0 This release

2 release files

1.0.0

2 release files

0.3.0

2 release files

0.1.0

2 release files

0.0.1

2 release files

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