optixstuff 6.0.0__tar.gz → 6.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {optixstuff-6.0.0 → optixstuff-6.1.0}/CHANGELOG.md +12 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/PKG-INFO +5 -5
- {optixstuff-6.0.0 → optixstuff-6.1.0}/README.md +4 -4
- {optixstuff-6.0.0 → optixstuff-6.1.0}/src/optixstuff/__init__.py +4 -2
- {optixstuff-6.0.0 → optixstuff-6.1.0}/src/optixstuff/_repr.py +1 -1
- {optixstuff-6.0.0 → optixstuff-6.1.0}/src/optixstuff/_version.py +2 -2
- {optixstuff-6.0.0 → optixstuff-6.1.0}/src/optixstuff/aperture_binding.py +4 -4
- {optixstuff-6.0.0 → optixstuff-6.1.0}/src/optixstuff/exposure.py +33 -0
- optixstuff-6.0.0/src/optixstuff/optical_path.py → optixstuff-6.1.0/src/optixstuff/instrument.py +11 -7
- {optixstuff-6.0.0 → optixstuff-6.1.0}/src/optixstuff/optical_elements.py +1 -1
- {optixstuff-6.0.0 → optixstuff-6.1.0}/.codespellrc +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/.editorconfig +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/.gitattributes +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/.gitignore +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/.pre-commit-config.yaml +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/.readthedocs.yaml +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/.zenodo.json +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/CITATION.cff +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/LICENSE +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/SECURITY.md +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/pyproject.toml +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/src/optixstuff/apertures.py +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/src/optixstuff/coronagraph.py +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/src/optixstuff/detector.py +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/src/optixstuff/disperser.py +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/src/optixstuff/performance.py +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/src/optixstuff/primary.py +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/src/optixstuff/rates.py +0 -0
- {optixstuff-6.0.0 → optixstuff-6.1.0}/src/optixstuff/speckle.py +0 -0
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [6.1.0](https://github.com/CoreySpohn/optixstuff/compare/v6.0.0...v6.1.0) (2026-11-20)
|
|
4
|
+
|
|
5
|
+
|
|
6
|
+
### Features
|
|
7
|
+
|
|
8
|
+
* **instrument:** keep OpticalPath as a deprecated alias of Instrument ([3966497](https://github.com/CoreySpohn/optixstuff/commit/3966497038ec8483c4fdb7f041c5b50a2a67bc29))
|
|
9
|
+
|
|
10
|
+
|
|
11
|
+
### Miscellaneous Chores
|
|
12
|
+
|
|
13
|
+
* release 6.1.0 ([9875570](https://github.com/CoreySpohn/optixstuff/commit/9875570bcffad65a04eb0caed8f082d7450320ac))
|
|
14
|
+
|
|
3
15
|
## [6.0.0](https://github.com/CoreySpohn/optixstuff/compare/v5.0.0...v6.0.0) (2026-11-19)
|
|
4
16
|
|
|
5
17
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.5
|
|
2
2
|
Name: optixstuff
|
|
3
|
-
Version: 6.
|
|
3
|
+
Version: 6.1.0
|
|
4
4
|
Summary: Hardware abstractions for the HWO direct imaging simulation suite
|
|
5
5
|
Project-URL: Homepage, https://github.com/CoreySpohn/optixstuff
|
|
6
6
|
Project-URL: Issues, https://github.com/CoreySpohn/optixstuff/issues
|
|
@@ -88,7 +88,7 @@ truth for the hardware configuration that downstream tools consume.
|
|
|
88
88
|
(2D image simulation), [coronachrome](https://github.com/CoreySpohn/coronachrome)
|
|
89
89
|
(lenslet-IFS dispersion + spectral extraction), and
|
|
90
90
|
[jaxEDITH](https://github.com/CoreySpohn/jaxedith)
|
|
91
|
-
(exposure-time and yield calculations) import the same `
|
|
91
|
+
(exposure-time and yield calculations) import the same `Instrument` class and
|
|
92
92
|
the same detector / throughput / primary / disperser types from optixstuff.
|
|
93
93
|
Change a value here and every downstream tool picks it up on the next import.
|
|
94
94
|
|
|
@@ -101,7 +101,7 @@ Change a value here and every downstream tool picks it up on the next import.
|
|
|
101
101
|
- **Not a scene model.** Stars, planets, disks, and zodi live in
|
|
102
102
|
[skyscapes](https://github.com/CoreySpohn/skyscapes).
|
|
103
103
|
- **Not a simulator.** Downstream tools (coronagraphoto, coronachrome, jaxEDITH)
|
|
104
|
-
consume an `
|
|
104
|
+
consume an `Instrument` to produce images, dispersed IFS frames, or count rates.
|
|
105
105
|
|
|
106
106
|
## Architecture
|
|
107
107
|
|
|
@@ -114,7 +114,7 @@ Built on [JAX](https://github.com/google/jax) and
|
|
|
114
114
|
hex segment geometry for a diffraction backend), `ConstantThroughput`,
|
|
115
115
|
`IdealDetector`, `Detector` (with optional wavelength-dependent QE),
|
|
116
116
|
`LensletDisperser`
|
|
117
|
-
- **Container** - `
|
|
117
|
+
- **Container** - `Instrument`, a composable hardware configuration passed to all
|
|
118
118
|
simulators
|
|
119
119
|
|
|
120
120
|
Optical elements and coronagraphs accept fidelity axes - **wavelength**, **position**, and
|
|
@@ -210,7 +210,7 @@ for noise parameters, gain statistics, and readout overlap.
|
|
|
210
210
|
flowchart TB
|
|
211
211
|
physopt["<b>Physical optics</b><br/>dLux / HCIPy / PROPER<br/>E-fields -> PSFs"]
|
|
212
212
|
provider["<b>Image provider</b><br/>PSF interpolation"]
|
|
213
|
-
optix["<b>optixstuff</b><br/>Telescope / Coronagraph / Detector /
|
|
213
|
+
optix["<b>optixstuff</b><br/>Telescope / Coronagraph / Detector / Instrument<br/>Throughput chains / QE / Noise rates"]
|
|
214
214
|
jaxedith["<b>jaxEDITH</b><br/>Scalar count rates<br/>Exposure-time calculations"]
|
|
215
215
|
corono["<b>coronagraphoto</b><br/>2D image simulation<br/>Multi-epoch scenes"]
|
|
216
216
|
coronachrome["<b>coronachrome</b><br/>Lenslet-IFS dispersion<br/>Spectral extraction"]
|
|
@@ -23,7 +23,7 @@ truth for the hardware configuration that downstream tools consume.
|
|
|
23
23
|
(2D image simulation), [coronachrome](https://github.com/CoreySpohn/coronachrome)
|
|
24
24
|
(lenslet-IFS dispersion + spectral extraction), and
|
|
25
25
|
[jaxEDITH](https://github.com/CoreySpohn/jaxedith)
|
|
26
|
-
(exposure-time and yield calculations) import the same `
|
|
26
|
+
(exposure-time and yield calculations) import the same `Instrument` class and
|
|
27
27
|
the same detector / throughput / primary / disperser types from optixstuff.
|
|
28
28
|
Change a value here and every downstream tool picks it up on the next import.
|
|
29
29
|
|
|
@@ -36,7 +36,7 @@ Change a value here and every downstream tool picks it up on the next import.
|
|
|
36
36
|
- **Not a scene model.** Stars, planets, disks, and zodi live in
|
|
37
37
|
[skyscapes](https://github.com/CoreySpohn/skyscapes).
|
|
38
38
|
- **Not a simulator.** Downstream tools (coronagraphoto, coronachrome, jaxEDITH)
|
|
39
|
-
consume an `
|
|
39
|
+
consume an `Instrument` to produce images, dispersed IFS frames, or count rates.
|
|
40
40
|
|
|
41
41
|
## Architecture
|
|
42
42
|
|
|
@@ -49,7 +49,7 @@ Built on [JAX](https://github.com/google/jax) and
|
|
|
49
49
|
hex segment geometry for a diffraction backend), `ConstantThroughput`,
|
|
50
50
|
`IdealDetector`, `Detector` (with optional wavelength-dependent QE),
|
|
51
51
|
`LensletDisperser`
|
|
52
|
-
- **Container** - `
|
|
52
|
+
- **Container** - `Instrument`, a composable hardware configuration passed to all
|
|
53
53
|
simulators
|
|
54
54
|
|
|
55
55
|
Optical elements and coronagraphs accept fidelity axes - **wavelength**, **position**, and
|
|
@@ -145,7 +145,7 @@ for noise parameters, gain statistics, and readout overlap.
|
|
|
145
145
|
flowchart TB
|
|
146
146
|
physopt["<b>Physical optics</b><br/>dLux / HCIPy / PROPER<br/>E-fields -> PSFs"]
|
|
147
147
|
provider["<b>Image provider</b><br/>PSF interpolation"]
|
|
148
|
-
optix["<b>optixstuff</b><br/>Telescope / Coronagraph / Detector /
|
|
148
|
+
optix["<b>optixstuff</b><br/>Telescope / Coronagraph / Detector / Instrument<br/>Throughput chains / QE / Noise rates"]
|
|
149
149
|
jaxedith["<b>jaxEDITH</b><br/>Scalar count rates<br/>Exposure-time calculations"]
|
|
150
150
|
corono["<b>coronagraphoto</b><br/>2D image simulation<br/>Multi-epoch scenes"]
|
|
151
151
|
coronachrome["<b>coronachrome</b><br/>Lenslet-IFS dispersion<br/>Spectral extraction"]
|
|
@@ -31,14 +31,14 @@ from optixstuff.detector import (
|
|
|
31
31
|
IdealDetector,
|
|
32
32
|
)
|
|
33
33
|
from optixstuff.disperser import AbstractDisperser, LensletDisperser
|
|
34
|
-
from optixstuff.exposure import FramePlan, frames_for_time
|
|
34
|
+
from optixstuff.exposure import Exposure, FramePlan, frames_for_time
|
|
35
|
+
from optixstuff.instrument import Instrument, OpticalPath
|
|
35
36
|
from optixstuff.optical_elements import (
|
|
36
37
|
AbstractOpticalElement,
|
|
37
38
|
AbstractUniformElement,
|
|
38
39
|
ConstantThroughput,
|
|
39
40
|
TransmissiveElement,
|
|
40
41
|
)
|
|
41
|
-
from optixstuff.optical_path import OpticalPath
|
|
42
42
|
from optixstuff.performance import PerformanceCurves, SampledProfile
|
|
43
43
|
from optixstuff.primary import AbstractPrimary, SegmentedPrimary, SimplePrimary
|
|
44
44
|
from optixstuff.rates import ElectronRates, IntegratedPhotonRates, PhotonRates
|
|
@@ -61,10 +61,12 @@ __all__ = [
|
|
|
61
61
|
"ConstantThroughput",
|
|
62
62
|
"Detector",
|
|
63
63
|
"ElectronRates",
|
|
64
|
+
"Exposure",
|
|
64
65
|
"FocalResponse",
|
|
65
66
|
"FramePlan",
|
|
66
67
|
"HalfMaximum",
|
|
67
68
|
"IdealDetector",
|
|
69
|
+
"Instrument",
|
|
68
70
|
"IntegratedPhotonRates",
|
|
69
71
|
"LensletDisperser",
|
|
70
72
|
"LinearSpeckleField",
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Each leaf class in optixstuff (primary, detector, throughput elements,
|
|
4
4
|
coronagraphs) defines its own one-line ``__repr__``; the
|
|
5
|
-
:class:`
|
|
5
|
+
:class:`Instrument` aggregator uses :func:`indent` to nest the
|
|
6
6
|
children one level deeper. Primary summaries label both diameter conventions;
|
|
7
7
|
coronagraph summaries distinguish data extent from a design working angle.
|
|
8
8
|
"""
|
|
@@ -18,7 +18,7 @@ version_tuple: tuple[int | str, ...]
|
|
|
18
18
|
commit_id: str | None
|
|
19
19
|
__commit_id__: str | None
|
|
20
20
|
|
|
21
|
-
__version__ = version = '6.
|
|
22
|
-
__version_tuple__ = version_tuple = (6,
|
|
21
|
+
__version__ = version = '6.1.0'
|
|
22
|
+
__version_tuple__ = version_tuple = (6, 1, 0)
|
|
23
23
|
|
|
24
24
|
__commit_id__ = commit_id = None
|
|
@@ -20,7 +20,7 @@ from optixstuff.coronagraph import (
|
|
|
20
20
|
AbstractCoronagraph,
|
|
21
21
|
AbstractImagingCoronagraph,
|
|
22
22
|
)
|
|
23
|
-
from optixstuff.
|
|
23
|
+
from optixstuff.instrument import Instrument
|
|
24
24
|
from optixstuff.performance import (
|
|
25
25
|
PerformanceCurves,
|
|
26
26
|
SampledProfile,
|
|
@@ -388,7 +388,7 @@ class PreparedAperture(eqx.Module):
|
|
|
388
388
|
|
|
389
389
|
|
|
390
390
|
def prepare_aperture(
|
|
391
|
-
|
|
391
|
+
instrument: Instrument,
|
|
392
392
|
quadrature: Quadrature,
|
|
393
393
|
*,
|
|
394
394
|
rule: ApertureRule = DEFAULT_APERTURE_RULE,
|
|
@@ -406,8 +406,8 @@ def prepare_aperture(
|
|
|
406
406
|
require dilation of the frozen reference aperture or template.
|
|
407
407
|
"""
|
|
408
408
|
waves = np.asarray(quadrature.nodes_nm)
|
|
409
|
-
coro =
|
|
410
|
-
primary =
|
|
409
|
+
coro = instrument.coronagraph
|
|
410
|
+
primary = instrument.primary
|
|
411
411
|
references = []
|
|
412
412
|
for band, row, node_waves in zip(
|
|
413
413
|
quadrature.bands, waves, quadrature.nodes_nm, strict=True
|
|
@@ -2,6 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
import equinox as eqx
|
|
4
4
|
import jax.numpy as jnp
|
|
5
|
+
from hwoutils.spectral import Quadrature
|
|
5
6
|
|
|
6
7
|
|
|
7
8
|
def _band_shape(first, second):
|
|
@@ -74,3 +75,35 @@ def frames_for_time(time_s, frame_time_s) -> FramePlan:
|
|
|
74
75
|
exact = (nearest > 0) & (jnp.abs(ratio - nearest) <= rtol * nearest)
|
|
75
76
|
count = jnp.maximum(jnp.ceil(jnp.where(exact, nearest, ratio)), 1.0)
|
|
76
77
|
return FramePlan(frame_time_s, jnp.where(time_s > 0, count, 0.0))
|
|
78
|
+
|
|
79
|
+
|
|
80
|
+
class Exposure(eqx.Module):
|
|
81
|
+
"""Everything about one observation except the scene and the instrument.
|
|
82
|
+
|
|
83
|
+
The record holds when and where the telescope points, how each band is
|
|
84
|
+
integrated over wavelength, and (for a drawn frame) how long the detector
|
|
85
|
+
collects. Build it on the host with ``coronagraphoto.build_exposure``.
|
|
86
|
+
The roll, the epoch and the quadrature nodes and weights are array
|
|
87
|
+
leaves, so an exposure can be an argument of JIT, vmap and grad.
|
|
88
|
+
|
|
89
|
+
Args:
|
|
90
|
+
time_d: Observation epoch in days from the scene epoch.
|
|
91
|
+
roll_deg: Position angle of detector +y, north through east, in
|
|
92
|
+
degrees; a traced leaf.
|
|
93
|
+
quadrature: Per-band wavelength nodes and weights.
|
|
94
|
+
plan: Whole-frame integration plan; None when only expected rates
|
|
95
|
+
are wanted.
|
|
96
|
+
ecliptic_latitude_deg: Ecliptic latitude of the line of sight used
|
|
97
|
+
for the local zodi. Known limitation: the default, 0 deg, is a
|
|
98
|
+
fixed stand-in, not derived from the target or the epoch.
|
|
99
|
+
solar_longitude_deg: Solar longitude of the line of sight used for
|
|
100
|
+
the local zodi. Known limitation: the default, 135 deg, is a
|
|
101
|
+
fixed stand-in, not derived from the target or the epoch.
|
|
102
|
+
"""
|
|
103
|
+
|
|
104
|
+
time_d: jnp.ndarray | float
|
|
105
|
+
roll_deg: jnp.ndarray = eqx.field(converter=lambda x: jnp.asarray(x) * 1.0)
|
|
106
|
+
quadrature: Quadrature
|
|
107
|
+
plan: FramePlan | None = None
|
|
108
|
+
ecliptic_latitude_deg: jnp.ndarray | float = 0.0
|
|
109
|
+
solar_longitude_deg: jnp.ndarray | float = 135.0
|
optixstuff-6.0.0/src/optixstuff/optical_path.py → optixstuff-6.1.0/src/optixstuff/instrument.py
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
"""
|
|
1
|
+
"""Instrument container -- the universal hardware configuration."""
|
|
2
2
|
|
|
3
3
|
from __future__ import annotations
|
|
4
4
|
|
|
@@ -23,7 +23,7 @@ from optixstuff.primary import AbstractPrimary, SimplePrimary
|
|
|
23
23
|
from optixstuff.speckle import AbstractSpeckleField
|
|
24
24
|
|
|
25
25
|
|
|
26
|
-
class
|
|
26
|
+
class Instrument(eqx.Module):
|
|
27
27
|
"""Universal hardware container for a coronagraphic telescope.
|
|
28
28
|
|
|
29
29
|
Bundles a primary mirror, ordered chain of attenuating elements,
|
|
@@ -98,11 +98,11 @@ class OpticalPath(eqx.Module):
|
|
|
98
98
|
n_channels: float = 1.0,
|
|
99
99
|
npix_multiplier: float = 1.0,
|
|
100
100
|
speckle: AbstractSpeckleField | None = None,
|
|
101
|
-
) ->
|
|
102
|
-
"""Build an
|
|
101
|
+
) -> Instrument:
|
|
102
|
+
"""Build an Instrument with reasonable HWO-like defaults.
|
|
103
103
|
|
|
104
104
|
Convenience for notebook / dev-script work: spin up a working
|
|
105
|
-
``
|
|
105
|
+
``Instrument`` by specifying only the coronagraph. All other
|
|
106
106
|
parameters get sensible defaults that can be overridden.
|
|
107
107
|
|
|
108
108
|
Args:
|
|
@@ -129,7 +129,7 @@ class OpticalPath(eqx.Module):
|
|
|
129
129
|
``None`` -- a perfect-wavefront path.
|
|
130
130
|
|
|
131
131
|
Returns:
|
|
132
|
-
A ready-to-use :class:`
|
|
132
|
+
A ready-to-use :class:`Instrument`.
|
|
133
133
|
"""
|
|
134
134
|
coro = coronagraph
|
|
135
135
|
|
|
@@ -192,7 +192,7 @@ class OpticalPath(eqx.Module):
|
|
|
192
192
|
"""Tree-shaped summary of every component."""
|
|
193
193
|
lines = [
|
|
194
194
|
(
|
|
195
|
-
f"
|
|
195
|
+
f"Instrument(n_channels={self.n_channels:.3g}, "
|
|
196
196
|
f"npix_multiplier={self.npix_multiplier:.3g})"
|
|
197
197
|
),
|
|
198
198
|
indent("primary: " + repr(self.primary)),
|
|
@@ -208,3 +208,7 @@ class OpticalPath(eqx.Module):
|
|
|
208
208
|
if self.speckle is not None:
|
|
209
209
|
lines.append(indent("speckle: " + repr(self.speckle)))
|
|
210
210
|
return "\n".join(lines)
|
|
211
|
+
|
|
212
|
+
|
|
213
|
+
OpticalPath = Instrument
|
|
214
|
+
"""Deprecated alias of `Instrument`, kept for code written against the old name."""
|
|
@@ -96,7 +96,7 @@ class TransmissiveElement(AbstractUniformElement):
|
|
|
96
96
|
|
|
97
97
|
The response table, interpolation and support belong to Transmission.
|
|
98
98
|
This element supplies the optical-path apply/get_throughput interface;
|
|
99
|
-
an
|
|
99
|
+
an Instrument multiplies the responses of its individual elements.
|
|
100
100
|
Use ConstantThroughput for a wavelength-independent scalar efficiency.
|
|
101
101
|
"""
|
|
102
102
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|