Skip to main content

A python library to simulate coronagraphic observations of exoplanets.

Project description

coronagraphoto logo

PyPI Documentation Status License Python Tests pre-commit


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 a skyscapes.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, SimpleDetector,
    load_scene_from_exovista, sim_system,
)
from coronagraphoto.optical_elements import ConstantThroughputElement
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=(ConstantThroughputElement(throughput=0.9),),
    coronagraph=coronagraph,
    detector=SimpleDetector(pixel_scale=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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

coronagraphoto-2.3.1.tar.gz (3.0 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

coronagraphoto-2.3.1-py3-none-any.whl (13.1 kB view details)

Uploaded Python 3

File details

Details for the file coronagraphoto-2.3.1.tar.gz.

File metadata

  • Download URL: coronagraphoto-2.3.1.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

Hashes for coronagraphoto-2.3.1.tar.gz
Algorithm Hash digest
SHA256 6ea576ed6722b8061da67e1f0dfa1b7c7db65d29faf818dad388c43b659312b7
MD5 a10e92968fde21076c63f44fdc5f89da
BLAKE2b-256 d23cbea319ddeb499d2b72abf11bcfc839ca71b2bcdce6e2d324b192fd13a0f1

See more details on using hashes here.

Provenance

The following attestation bundles were made for coronagraphoto-2.3.1.tar.gz:

Publisher: publish-to-pypi.yml on CoreySpohn/coronagraphoto

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file coronagraphoto-2.3.1-py3-none-any.whl.

File metadata

  • Download URL: coronagraphoto-2.3.1-py3-none-any.whl
  • Upload date:
  • Size: 13.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for coronagraphoto-2.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 91a812ec790b3ae0c9760773818e48151e7748ff4ae337102e1902da75fdf5a0
MD5 9c71b5721738c52eb72f543e7c7ecb27
BLAKE2b-256 afa305fb8b825ce8c58522510ee14c35e385ac7e12bfcbd4e8c700d2e4ad6566

See more details on using hashes here.

Provenance

The following attestation bundles were made for coronagraphoto-2.3.1-py3-none-any.whl:

Publisher: publish-to-pypi.yml on CoreySpohn/coronagraphoto

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page