Skip to main content

PyPI Documentation Status Tests License Python 3.12+ DOI

skyscapes

JAX-native astrophysical scene modeling for HWO direct imaging.

System.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). System.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" — one System (a star with planets and optionally a disk) plus optional background sources (zodiacal light, background galaxies, etc.).
  • 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; System 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 · System · Star · Planet · Disk · Zodi · PhysicalModel"])
    opt["<b>optixstuff</b><br/>OpticalPath"]
    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 composes a System (star + planets + optional disk) with an optional Zodi 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; System.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 — 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 Scene, from_exovista

system = from_exovista("path/to/exovista_system.fits", planet_spectra="auto")
scene = Scene(system=system)

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. System contrast methods call contrast_at_time(..., time_d=..., star=..., dist_pc=...); phase-dependent models inherit a default hook that delegates to contrast. System.planet_flux_densities calls the model's spec_flux_density(wavelength_nm, phase_angle_rad=..., dist_AU=..., Rp_Rearth=..., time_d=..., star=..., dist_pc=...), returning (K, T) photon flux 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, System
from skyscapes.scene import FlatStar, Planet
from skyscapes.physical_model import LambertianPhysicalModel
from skyscapes.background 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(
    wavelengths_nm=jnp.linspace(400, 1000, 60),
    surface_brightness_mag=22.0,
)

system = System.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]),
)
scene = Scene(
    system=system,
    zodi=zodi,
)

Installation

pip install skyscapes

Status

This package is in early development.

Metadata

Release files for skyscapes 4.0.1

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 4.0.1
File Size Uploaded Provenance Actions
skyscapes-4.0.1.tar.gz 541.3 kB With provenance Details for skyscapes-4.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 1.1 MB

Release files / skyscapes-4.0.1.tar.gz

Download URL skyscapes-4.0.1.tar.gz
Size 541.3 kB
Tags Source
SHA-256 checksum
How to use checksums
945ef7c11d199e123593a9035fdfbdaf62c1ecb99d3b51223f4727107b6cf805
BLAKE2b-256 checksum
How to use checksums
9c9130a5d448e5aaf1584271e36b86c02a6ca4fc93c6500ab8e4029c33326ef9
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 16, 2026.

Transparency log

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

Download URL skyscapes-4.0.1-py3-none-any.whl
Size 558.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
37561cb5d04ff29bd8309d69db0bb7803b4d59c049814c878280bbefedc72370
BLAKE2b-256 checksum
How to use checksums
04ca3ef04c4f87251074f36f8cb7cf3e20d4905b448ee863ac206ae33f267690
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 16, 2026.

Transparency log

Security for skyscapes 4.0.1

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-4.0.1.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 16, 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