Metadata-Version: 2.4
Name: optixstuff
Version: 0.0.1
Summary: Hardware abstractions for the HWO direct imaging simulation suite
Project-URL: Homepage, https://github.com/CoreySpohn/optixstuff
Project-URL: Issues, https://github.com/CoreySpohn/optixstuff/issues
Author-email: Corey Spohn <corey.a.spohn@nasa.gov>
License: MIT License
        
        Copyright (c) 2026 Corey Spohn
        
        Permission is hereby granted, free of charge, to any person obtaining a copy
        of this software and associated documentation files (the "Software"), to deal
        in the Software without restriction, including without limitation the rights
        to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
        copies of the Software, and to permit persons to whom the Software is
        furnished to do so, subject to the following conditions:
        
        The above copyright notice and this permission notice shall be included in all
        copies or substantial portions of the Software.
        
        THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
        IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
        FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
        AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
        LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
        OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
        SOFTWARE.
License-File: LICENSE
Classifier: Development Status :: 2 - Pre-Alpha
Classifier: Intended Audience :: Science/Research
Classifier: License :: OSI Approved :: MIT License
Classifier: Programming Language :: Python :: 3
Classifier: Topic :: Scientific/Engineering :: Astronomy
Requires-Python: >=3.11
Requires-Dist: equinox>=0.12.0
Requires-Dist: interpax
Requires-Dist: jax>=0.4.1
Requires-Dist: jaxlib>=0.4.1
Requires-Dist: yippy
Provides-Extra: dev
Requires-Dist: pre-commit; extra == 'dev'
Provides-Extra: docs
Requires-Dist: ipython; extra == 'docs'
Requires-Dist: matplotlib; extra == 'docs'
Requires-Dist: myst-nb; extra == 'docs'
Requires-Dist: sphinx; extra == 'docs'
Requires-Dist: sphinx-autoapi; extra == 'docs'
Requires-Dist: sphinx-autodoc-typehints; extra == 'docs'
Requires-Dist: sphinx-book-theme; extra == 'docs'
Provides-Extra: test
Requires-Dist: hypothesis; extra == 'test'
Requires-Dist: nox; extra == 'test'
Requires-Dist: pytest; extra == 'test'
Requires-Dist: pytest-cov; extra == 'test'
Description-Content-Type: text/markdown

# optixstuff

Flux-level optical system abstractions for the HWO direct imaging simulation suite.

## What optixstuff is

`optixstuff` is the **radiometric hardware layer** for HWO simulations. It operates on
**flux** — photon rates, throughput fractions, and detector-level noise — providing the
shared interfaces that simulation tools and exposure time calculators build on top of.

The same `OpticalPath` object drives both scalar ETC calculations (`jaxEDITH`) and full
2D image generation (`coronagraphoto`), ensuring that the hardware model is consistent
across all downstream science products.

## What optixstuff is *not*

`optixstuff` does not model diffraction, wavefront propagation, or E-field interference.
That level of physical optics belongs to tools like [dLux](https://github.com/LouisDesdoigts/dLux)
and [HCIPy](https://github.com/ehpor/hcipy), which generate PSFs from first principles.

`optixstuff` and these wavefront tools are **complementary**: dLux/HCIPy compute the PSFs,
which are delivered as yield input packages (YIPs). `optixstuff` consumes those PSFs as
flux patterns (via [yippy](https://github.com/CoreySpohn/yippy)) and composes them with
the rest of the observatory — throughput chain, detector QE, noise — to produce
science-level outputs.

## Architecture

Built on [JAX](https://github.com/google/jax) and
[Equinox](https://github.com/patrick-kidger/equinox), `optixstuff` provides:

- **Abstract interfaces** — `AbstractPrimary`, `AbstractOpticalElement`,
  `AbstractCoronagraph`, `AbstractDetector`
- **Concrete implementations** — `SimplePrimary`, `ConstantThroughputElement`,
  `SimpleDetector`
- **Container** — `OpticalPath`, a composable hardware configuration passed to all
  simulators

Every abstract method accepts three fidelity axes — **wavelength**, **position**, and
**time** — with defaults so that simple implementations can ignore unused axes while
future high-fidelity models (wavelength-dependent coatings, position-dependent vignetting,
time-dependent detector degradation) can use them without breaking the interface.

### Ecosystem position

```
                          ┌───────────────────────────┐
                          │  Physical optics           │
                          │  (dLux, HCIPy, PROPER)     │
                          │  E-fields → PSFs           │
                          └──────────┬────────────────┘
                                     │ YIP
                          ┌──────────▼────────────────┐
                          │  yippy                     │
                          │  PSF interpolation         │
                          └──────────┬────────────────┘
                                     │ flux patterns
              ┌──────────────────────▼────────────────────────┐
              │                  optixstuff                    │
              │  Telescope • Coronagraph • Detector • OpticalPath │
              │  Throughput chains • QE • Noise rates          │
              └────────┬──────────────────────┬───────────────┘
                       │                      │
            ┌──────────▼──────────┐ ┌────────▼───────────────┐
            │  jaxEDITH           │ │  coronagraphoto         │
            │  Scalar count rates │ │  2D image simulation    │
            │  Exposure times     │ │  Multi-epoch scenes     │
            └─────────────────────┘ └────────────────────────┘
```

## Installation

```bash
pip install optixstuff
```

## Status

This package is in early development (pre-v0.1.0).
