Skip to main content

PyPI Documentation Status Tests License Python 3.12+ DOI

skyscapes

JAX-native astrophysical scene modeling for HWO direct imaging.

Scene.ephemeris returns orbix's barycentric (east, north, away) states, with scene-order planet indices for relative observables. This frame is right-handed: z is positive away from the observer, and dz/dt is positive receding. The standard phase angle beta satisfies cos(beta) = z / r for the star-relative vector (zero at full phase). Scene.positions returns rows 0 and 1 as (Delta alpha*, Delta Dec), where Delta alpha* = Delta RA cos Dec. ExoVista positions and velocities are converted from (west, north, toward) with (-x, y, -z) before deriving elements; the header midplane mapping remains (-PA) % 360.

What skyscapes is

skyscapes provides the scene representation that downstream HWO simulation tools consume — a forward model that runs at variable fidelity, from analytic sandbox models for fast iteration up to research-grade physics for retrievals. High-fidelity scene generators like ExoVista feed into skyscapes through loaders (from_exovista); skyscapes does not try to replace them.

  • A Scene is "everything on the sky that the telescope sees" — a star with planets, an optional disk (the exozodi) and optional local zodiacal light, held by one Scene.
  • Source models (Star, Planet, Disk, physical models, backgrounds) are composable eqx.Modules — swap any one without touching the rest, or swap the whole class for a higher-fidelity variant.
  • Loaders bridge external simulation outputs (ExoVista FITS) into the workspace via from_exovista(...).

The same Scene flows through both the coronagraphoto image simulator and the jaxEDITH ETC, so the astrophysical content is consistent across all downstream science products.

What skyscapes is not

  • Not a radiative transfer engine. The ExoJaxPhysicalModel is a thin adapter over ExoJAX; skyscapes does not implement its own RT.
  • Not an orbit propagator. Orbital mechanics live in orbix; Scene holds an orbix.system.System for dynamics.
  • Not a simulator. Downstream tools (coronagraphoto, jaxEDITH) consume a Scene to produce images / count rates.

Ecosystem position

flowchart LR
    src["External sources<br/>ExoVista · spectra · catalogues"]
    sky(["<b>skyscapes</b><br/>Scene · Star · Planet · Disk · PhysicalModel"])
    opt["<b>optixstuff</b><br/>Instrument"]
    cor["<b>coronagraphoto</b><br/>2D image simulation"]
    jet["<b>jaxedith</b><br/>Scalar count rates"]

    src --> sky
    sky --> cor
    sky --> jet
    opt --> cor
    opt --> jet

Architecture

A Scene holds a star, planets, an optional disk and an optional zodi.jax.AbstractLocalZodi background:

  • Stars — Star (wavelength- and time-dependent spectrum, ExoVista- backed) and FlatStar (constant-flux sandbox). Imported stars retain FITS metadata and optional StarSpots geometry and temperatures.
  • Planets — Planet owns radii (Rp_Rearth) and an AbstractPhysicalModel; Scene.dynamics owns masses, orbital state, and observer distance.
  • Physical models — LambertianPhysicalModel, GridPhysicalModel (wavelength/phase contrast tables), TimeSeriesPhysicalModel (wavelength/time-offset contrast tables), PrecomputedPhysicalModel (cached reflectivity for hot loops), ExoJaxPhysicalModel (full 2-stream RT via ExoJAX), BlackbodyPhysicalModel and ExoJaxEmissionModel (thermal emission), and SumPhysicalModel (additive radiative contributions).
  • Disks — ExovistaDisk, ExovistaParametricDisk, GraterDisk, CompositeDisk.
  • Backgrounds (from zodi.jax) — AYOZodi (AYO-convention defaults), LeinertZodi (full position-dependent Leinert+1998), PrecomputedZodi (cached flux array).

Every leaf is an eqx.Module PyTree, so JAX transforms (jit, vmap, grad) compose end-to-end.

Quick start

The easiest path is loading an ExoVista FITS file:

Requires a user-supplied ExoVista FITS file.

import jax

jax.config.update("jax_enable_x64", True)

from skyscapes import from_exovista

# A Scene: star, planets and disk, plus a default AYOZodi (scene.zodi)
scene = from_exovista("path/to/exovista_system.fits", planet_spectra="auto")

The importer requires JAX x64 to preserve orbital-state precision. ExoVista's elapsed years map to Julian Dates as 2451545.0 + 365.25 * elapsed_years. The importer assigns simulation time zero to J2000.0; this origin is not a measured observation date. The first stellar timestamp sets system.epoch (default tdb label; the file states no time scale). All stored times and orbit reference times are days from that epoch, converted on the host before transfer to JAX.

All evaluation arguments are time_d, days from the scene epoch. Convert Julian dates once on the host with time_d = system.epoch.days(absolute_dates), then pass the offsets to JAX. The read-only system.epoch is system.dynamics.frame.epoch; models store only offset arrays such as times_d.

from_exovista identifies the stellar and planetary extensions from their FITS headers, supporting both the legacy layout and the newer layout with a starspot extension. planet_spectra="auto" keeps the legacy phase-based model for older files and uses physical-time contrast tables for newer files. Select "time" explicitly to retain the sampled history in an older file, or "phase" to request a phase-only approximation that discards activity history.

Imported stellar spectra use linear interpolation to preserve nonnegative tabulated flux (Star(interpolation_method="linear")). Multi-epoch stellar and time-series planet models return NaN outside their recorded time range; a single epoch is a static snapshot. Spectral queries remain bounded by the supplied wavelength grid. Directly constructed Star objects retain cubic interpolation by default.

Star.spots and Star.metadata preserve source records. Loading spot geometry does not yet provide resolved stellar-surface propagation or asymmetric stellar leakage through a coronagraph. Scene contrast methods call contrast_at_time(..., time_d=..., star=..., dist_pc=...); phase-dependent models inherit a default hook that delegates to contrast. Scene.planet_flux_densities calls the model's photon_flux_density(wavelength_nm, time_d, *, phase_angle_rad=..., star_planet_distance_AU=..., Rp_Rearth=..., star=..., dist_pc=...), returning (K, T) plus the wavelength shape, in ph/s/m²/nm. Thermal models evaluate flux directly; SumPhysicalModel adds component fluxes, including through bin integration.

Building one from scratch:

import jax.numpy as jnp
from hwoutils.constants import Mearth2kg, Msun2kg

from skyscapes import Scene
from skyscapes.scene import FlatStar, Planet
from skyscapes.physical_model import LambertianPhysicalModel
from zodi.jax import AYOZodi

star = FlatStar(
    flux_phot_per_nm_m2=1e9,
)

physical_model = LambertianPhysicalModel(Ag=jnp.array([0.3]))
planet = Planet(
    Rp_Rearth=jnp.array([1.0]),
    physical_model=physical_model,
)

zodi = AYOZodi(surface_brightness_mag_arcsec2=22.0)

scene = Scene.from_classical(
    star=star,
    planets=(planet,),
    star_mass_Msun=1.0,
    planet_mass_Msun=jnp.array([Mearth2kg / Msun2kg]),
    dist_pc=10.0,
    a_AU=jnp.array([1.0]),
    e=jnp.array([0.0]),
    W_rad=jnp.array([0.0]),
    i_rad=jnp.array([jnp.pi / 3]),
    w_rad=jnp.array([0.0]),
    M0_rad=jnp.array([0.0]),
    zodi=zodi,
)

Installation

pip install skyscapes

Status

This package is in early development.

Metadata

Release files for skyscapes 5.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 skyscapes 5.1.0
File Size Uploaded Provenance Actions
skyscapes-5.1.0.tar.gz 539.9 kB With provenance Details for skyscapes-5.1.0.tar.gz

Built distribution (wheel)

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

Total release size: 1.1 MB

Release files / skyscapes-5.1.0.tar.gz

Download URL skyscapes-5.1.0.tar.gz
Size 539.9 kB
Tags Source
SHA-256 checksum
How to use checksums
6683fbc38cb4bb6dd292f9dfa0df45dd43aab3b50c1616e1af15b520f42af124
BLAKE2b-256 checksum
How to use checksums
98f00d10f65b5e5bac502c2b4461b87b004b72c3e835338694c25f1b0c73535a
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 20, 2026.

Transparency log

Release files / skyscapes-5.1.0-py3-none-any.whl

Download URL skyscapes-5.1.0-py3-none-any.whl
Size 555.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
9ae60bdcf2d5b7629938c442099d6dff24c9f6b3c49bec23f6d8b69cdc16a2da
BLAKE2b-256 checksum
How to use checksums
c42da697ece721fe5088cbf2891e1a993cf1b99061475e9790d8904ba72c5206
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 20, 2026.

Transparency log

Security for skyscapes 5.1.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 skyscapes-5.1.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 20, 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