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 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, AYOExozodi (the analytic AYO exozodi).
  • Backgrounds -- AYOZodi (AYO-convention defaults), LeinertZodi (full sightline-dependent Leinert+1998), PrecomputedZodi (cached flux array).
  • Populations -- draw_population and OccurrencePopulation draw planets around a target list from occurrence rates.

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.

from skyscapes import from_exovista

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

The importer supports float32 and float64. It subtracts the stellar position and velocity on the host before converting the relative states to the scene 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. By default, the first stellar timestamp sets system.epoch (the file has no time scale, so the default label is tdb). Stellar and planetary table knots, spot records and orbital elements use days from that first timestamp.

Pass epoch=shared_epoch to read multiple scenes on one observation clock. Scene reads, stellar flux, time-series contrast and system.dynamics.solve take days from system.epoch. Pass the NumPy float64 offsets from system.epoch.days(jd=absolute_dates) directly so the first-sample offset is subtracted before conversion to the working precision. For varying float32 time arguments inside JIT, load with the default epoch and convert dates to days from the first sample on the host.

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 preserves the source spot records; skyscapes.io.exovista_header(path) returns the stellar FITS header as a plain dictionary. 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 skyscapes 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]),
    local_zodi=zodi,
)

Installation

pip install skyscapes

Status

This package is in early development.

Metadata

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

Built distribution (wheel)

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

Total release size: 1.2 MB

Release files / skyscapes-6.0.0.tar.gz

Download URL skyscapes-6.0.0.tar.gz
Size 586.5 kB
Tags Source
SHA-256 checksum
How to use checksums
b6808bcca47c9f752331006c421bde25c16ef12ce7669ab7043b5f1428c91854
BLAKE2b-256 checksum
How to use checksums
af21028430a7f35efbd47142480b91dd98ba68f536deee790b53991ea4cf1da2
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 / skyscapes-6.0.0-py3-none-any.whl

Download URL skyscapes-6.0.0-py3-none-any.whl
Size 603.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
ce9827d36f0b38cede997efd0056afce9c35d278946129ec5416fd5de0a4062e
BLAKE2b-256 checksum
How to use checksums
fc43107775b49dfc85a61e84bf6b82b3a7ba0d66da64f267d9aa188171c1155b
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 skyscapes 6.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 skyscapes-6.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