A python library to simulate coronagraphic observations of exoplanets.
Project description
coronagraphoto
coronagraphoto is a Python library designed to simulate coronagraphic observations of exoplanetary systems. The base "thing" it produces are images/photos, hence the name. It has been designed to bridge the gap between yield calculations and concrete image generation for missions like the Habitable Worlds Observatory (HWO).
The library integrates high-fidelity coronagraph models from the standard format used for yield calculations (dubbed a "Yield Input Package" and loaded via yippy) with detailed planetary system simulations (via ExoVista) to produce realistic detector images.
Built on JAX, coronagraphoto is fully JIT-compilable, differentiable, and GPU-accelerated, making it suitable for large-scale optimization and high-performance simulation.
Key Features
- End-to-End Simulation: From astrophysical scenes to detector readouts.
- JAX & JIT Compatible: High-performance simulations using functional programming patterns.
- Modular Design: flexible optical paths, easily swappable coronagraphs and detectors.
- HWO Ready: Specifically designed to support yield modeling for future direct imaging missions.
Installation
pip install coronagraphoto
(Note: You may need to install JAX separately to match your specific hardware acceleration requirements (CUDA/TPU/CPU).)
Design philosophy: "Bring your own physics"
coronagraphoto does not provide a single, black-box run_simulation() function. It provides primitives (per-source sim_* functions, an OpticalPath, detectors and throughput elements) and a thin orchestrator (sim_system) that sums them. The convention:
- Per-source simulators:
sim_<source>(source, optical_path, prng_key, *, observation_kwargs)-- one source, one detector readout. - Whole-scene orchestrator:
sim_system(scene, optical_path, prng_key, *, observation_kwargs)-- sums star + planets + disk + zodi from askyscapes.Scene.
This keeps the pipeline transparent (you know exactly which sources contributed), flexible (drop in custom noise, return spectral cubes, RDI two scenes), and fast (each per-source kernel is JIT-cached at its natural shape boundary).
Quick start
import jax
from coronagraphoto import (
OpticalPath, PrimaryAperture, IdealDetector,
load_scene_from_exovista, sim_system,
)
from coronagraphoto.optical_elements import ConstantThroughput
from yippy import EqxCoronagraph
# 1. Load a skyscapes.Scene (system + default zodi) from ExoVista.
scene = load_scene_from_exovista("path/to/exovista_system.fits")
# 2. Build the optical path.
coronagraph = EqxCoronagraph("path/to/coronagraph_data")
optical_path = OpticalPath(
primary=PrimaryAperture(diameter_m=6.0),
attenuating_elements=(ConstantThroughput(throughput=0.9),),
coronagraph=coronagraph,
detector=IdealDetector(pixel_scale_arcsec=0.01, shape=(512, 512)),
)
# 3. Simulate one detector readout.
image = sim_system(
scene,
optical_path,
jax.random.PRNGKey(0),
start_time_jd=2_460_000.0,
exposure_time_s=3600.0,
wavelength_nm=550.0,
bin_width_nm=50.0,
telescope_pa_deg=0.0,
ecliptic_lat_deg=0.0,
solar_lon_deg=135.0,
)
For broadband / IFS simulations, jax.vmap over wavelength_nm (and sum or stack the result) -- the kwarg-only signature is designed so the wavelength axis is a clean vmap target.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file coronagraphoto-3.0.0.tar.gz.
File metadata
- Download URL: coronagraphoto-3.0.0.tar.gz
- Upload date:
- Size: 3.0 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0411d96742391fc5cfeb2fdd45b706288044a46f1b13b2cd43df5d660ce5b4bb
|
|
| MD5 |
40d1ba57dabf1081430607b6cc502c40
|
|
| BLAKE2b-256 |
2c9f28943532b7abf952b828ec7d682b9afd8a01498f32668b3f258a686ff979
|
Provenance
The following attestation bundles were made for coronagraphoto-3.0.0.tar.gz:
Publisher:
publish-to-pypi.yml on CoreySpohn/coronagraphoto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coronagraphoto-3.0.0.tar.gz -
Subject digest:
0411d96742391fc5cfeb2fdd45b706288044a46f1b13b2cd43df5d660ce5b4bb - Sigstore transparency entry: 1631360013
- Sigstore integration time:
-
Permalink:
CoreySpohn/coronagraphoto@49a18256ef43bb602546c4bdf1dabe34d038581f -
Branch / Tag:
refs/tags/v3.0.0 - Owner: https://github.com/CoreySpohn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@49a18256ef43bb602546c4bdf1dabe34d038581f -
Trigger Event:
push
-
Statement type:
File details
Details for the file coronagraphoto-3.0.0-py3-none-any.whl.
File metadata
- Download URL: coronagraphoto-3.0.0-py3-none-any.whl
- Upload date:
- Size: 12.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
6cc7759b5196681a96ebec0057687d733b1d98c05a0314ea2a0cd97a3f78b1dc
|
|
| MD5 |
0c609594ac5fba91d7b1196c2bec2b8e
|
|
| BLAKE2b-256 |
96f1f7cbf9e5c65d053f394d252705ad3e560890024d7470e1ec5546d17c1789
|
Provenance
The following attestation bundles were made for coronagraphoto-3.0.0-py3-none-any.whl:
Publisher:
publish-to-pypi.yml on CoreySpohn/coronagraphoto
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
coronagraphoto-3.0.0-py3-none-any.whl -
Subject digest:
6cc7759b5196681a96ebec0057687d733b1d98c05a0314ea2a0cd97a3f78b1dc - Sigstore transparency entry: 1631360030
- Sigstore integration time:
-
Permalink:
CoreySpohn/coronagraphoto@49a18256ef43bb602546c4bdf1dabe34d038581f -
Branch / Tag:
refs/tags/v3.0.0 - Owner: https://github.com/CoreySpohn
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish-to-pypi.yml@49a18256ef43bb602546c4bdf1dabe34d038581f -
Trigger Event:
push
-
Statement type: