Skip to main content

Shared JAX-based utilities for the HWO direct imaging simulation suite — constants, conversions, and image transforms.

Project description

PyPI Documentation Status Tests License Python Versions


hwoutils

hwoutils is the shared utility foundation for the HWO direct imaging simulation suite. It provides JAX-native physical constants, unit conversions, and flux-conserving image transforms used across:

  • yippy — Coronagraph performance modeling
  • orbix — Orbital dynamics and target scheduling
  • coronagraphoto — Image simulation for coronagraphic observations
  • coronalyze — Post-processing and SNR analysis
  • hwosim — End-to-end mission simulations

Key Features

  • Physical Constants — Single source of truth for SI constants, conversion factors, and astronomical quantities
  • Unit Conversions — Pure JAX conversion functions (angular, flux, distance, time) with zero astropy overhead
  • Image Transforms — Flux-conserving resampling, sub-pixel shifts, and cubic spline interpolation
  • JAX-Native — All operations are JIT-compilable, differentiable, and GPU-accelerated

Installation

With uv (recommended):

uv pip install hwoutils

Or with pip:

pip install hwoutils

Quick Start

from hwoutils import constants as const
from hwoutils import conversions as conv
from hwoutils.transforms import resample_flux

# Convert 5 arcsec to lambda/D for a 6m telescope at 550nm
sep_lod = conv.arcsec_to_lambda_d(5.0, 550.0, 6.0)

# Flux-conserving PSF resampling
resampled = resample_flux(psf, pixscale_src=0.01, pixscale_tgt=0.1, shape_tgt=(64, 64))

Documentation

Full documentation is available at hwoutils.readthedocs.io.

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

hwoutils-1.3.1.tar.gz (15.5 kB view details)

Uploaded Source

Built Distribution

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

hwoutils-1.3.1-py3-none-any.whl (14.5 kB view details)

Uploaded Python 3

File details

Details for the file hwoutils-1.3.1.tar.gz.

File metadata

  • Download URL: hwoutils-1.3.1.tar.gz
  • Upload date:
  • Size: 15.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hwoutils-1.3.1.tar.gz
Algorithm Hash digest
SHA256 53f24f8f898ae0fba8d9b0c9d489eed2c8a4f088b4d7b3499ba44e398d037894
MD5 a7d27e6ed33b5c15975a13b854094e59
BLAKE2b-256 cf04f5844383f61aec18adcecb4784cc02a2a0094cf712f63b634390b2988a30

See more details on using hashes here.

Provenance

The following attestation bundles were made for hwoutils-1.3.1.tar.gz:

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

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

File details

Details for the file hwoutils-1.3.1-py3-none-any.whl.

File metadata

  • Download URL: hwoutils-1.3.1-py3-none-any.whl
  • Upload date:
  • Size: 14.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for hwoutils-1.3.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b9040abdce6fa5ff93202e29090910109da365e277ef756fed65709399cf6357
MD5 47ea0f32d1c5d7e16811b6cffee35d45
BLAKE2b-256 f95a2dc7c0008c400befa83a38f6ba7d08be0c5153affb4583c065f18bc16d3f

See more details on using hashes here.

Provenance

The following attestation bundles were made for hwoutils-1.3.1-py3-none-any.whl:

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

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