optixstuff 4.0.0__tar.gz → 4.0.1__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.
Files changed (27) hide show
  1. {optixstuff-4.0.0 → optixstuff-4.0.1}/.pre-commit-config.yaml +1 -1
  2. {optixstuff-4.0.0 → optixstuff-4.0.1}/CHANGELOG.md +7 -0
  3. {optixstuff-4.0.0 → optixstuff-4.0.1}/PKG-INFO +10 -2
  4. {optixstuff-4.0.0 → optixstuff-4.0.1}/README.md +9 -0
  5. {optixstuff-4.0.0 → optixstuff-4.0.1}/pyproject.toml +0 -1
  6. {optixstuff-4.0.0 → optixstuff-4.0.1}/src/optixstuff/_version.py +2 -2
  7. {optixstuff-4.0.0 → optixstuff-4.0.1}/src/optixstuff/yippy_coronagraph.py +78 -4
  8. {optixstuff-4.0.0 → optixstuff-4.0.1}/.codespellrc +0 -0
  9. {optixstuff-4.0.0 → optixstuff-4.0.1}/.editorconfig +0 -0
  10. {optixstuff-4.0.0 → optixstuff-4.0.1}/.gitattributes +0 -0
  11. {optixstuff-4.0.0 → optixstuff-4.0.1}/.gitignore +0 -0
  12. {optixstuff-4.0.0 → optixstuff-4.0.1}/.readthedocs.yaml +0 -0
  13. {optixstuff-4.0.0 → optixstuff-4.0.1}/.zenodo.json +0 -0
  14. {optixstuff-4.0.0 → optixstuff-4.0.1}/CITATION.cff +0 -0
  15. {optixstuff-4.0.0 → optixstuff-4.0.1}/LICENSE +0 -0
  16. {optixstuff-4.0.0 → optixstuff-4.0.1}/SECURITY.md +0 -0
  17. {optixstuff-4.0.0 → optixstuff-4.0.1}/src/optixstuff/__init__.py +0 -0
  18. {optixstuff-4.0.0 → optixstuff-4.0.1}/src/optixstuff/_repr.py +0 -0
  19. {optixstuff-4.0.0 → optixstuff-4.0.1}/src/optixstuff/coronagraph.py +0 -0
  20. {optixstuff-4.0.0 → optixstuff-4.0.1}/src/optixstuff/detector.py +0 -0
  21. {optixstuff-4.0.0 → optixstuff-4.0.1}/src/optixstuff/disperser.py +0 -0
  22. {optixstuff-4.0.0 → optixstuff-4.0.1}/src/optixstuff/exposure.py +0 -0
  23. {optixstuff-4.0.0 → optixstuff-4.0.1}/src/optixstuff/optical_elements.py +0 -0
  24. {optixstuff-4.0.0 → optixstuff-4.0.1}/src/optixstuff/optical_path.py +0 -0
  25. {optixstuff-4.0.0 → optixstuff-4.0.1}/src/optixstuff/primary.py +0 -0
  26. {optixstuff-4.0.0 → optixstuff-4.0.1}/src/optixstuff/speckle.py +0 -0
  27. {optixstuff-4.0.0 → optixstuff-4.0.1}/tools/check_internal_refs.py +0 -0
@@ -21,7 +21,7 @@ repos:
21
21
  args: [--fix]
22
22
  - id: ruff-format
23
23
  - repo: https://github.com/codespell-project/codespell
24
- rev: v2.4.1
24
+ rev: v2.4.3
25
25
  hooks:
26
26
  - id: codespell
27
27
  - repo: https://github.com/compilerla/conventional-pre-commit
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [4.0.1](https://github.com/CoreySpohn/optixstuff/compare/v4.0.0...v4.0.1) (2026-11-06)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * route yippy stellar and sky products through their own frame ([b9a029b](https://github.com/CoreySpohn/optixstuff/commit/b9a029b2b03a96564b443ad14aacfe3fdbb9b62b))
9
+
3
10
  ## [4.0.0](https://github.com/CoreySpohn/optixstuff/compare/v3.0.0...v4.0.0) (2026-11-05)
4
11
 
5
12
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: optixstuff
3
- Version: 4.0.0
3
+ Version: 4.0.1
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
@@ -54,7 +54,6 @@ Provides-Extra: test
54
54
  Requires-Dist: hypothesis>=6.79.1; extra == 'test'
55
55
  Requires-Dist: numpy>=2.0; extra == 'test'
56
56
  Requires-Dist: psutil>=5.9.4; extra == 'test'
57
- Requires-Dist: pytest-cov>=1.0; extra == 'test'
58
57
  Requires-Dist: pytest-fail-slow>=0.1.0; extra == 'test'
59
58
  Requires-Dist: pytest-markdown-docs>=0.5.0; extra == 'test'
60
59
  Requires-Dist: pytest-testmon>=2.0.7; extra == 'test'
@@ -65,6 +64,15 @@ Description-Content-Type: text/markdown
65
64
 
66
65
  # optixstuff
67
66
 
67
+ <p align="center">
68
+ <a href="https://pypi.org/project/optixstuff/"><img src="https://img.shields.io/pypi/v/optixstuff.svg?style=flat-square&logo=pypi" alt="PyPI"/></a>
69
+ <a href="https://optixstuff.readthedocs.io"><img src="https://readthedocs.org/projects/optixstuff/badge/?version=latest&style=flat-square" alt="Documentation Status"/></a>
70
+ <a href="https://github.com/CoreySpohn/optixstuff/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/CoreySpohn/optixstuff/ci.yml?branch=main&style=flat-square&logo=github&label=tests" alt="Tests"/></a>
71
+ <a href="https://github.com/CoreySpohn/optixstuff/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square" alt="License"/></a>
72
+ <a href="https://github.com/CoreySpohn/optixstuff/blob/main/pyproject.toml"><img src="https://img.shields.io/badge/python-3.12%2B-blue.svg?style=flat-square&logo=python" alt="Python 3.12+"/></a>
73
+ <a href="https://doi.org/10.5281/zenodo.20819379"><img src="https://img.shields.io/badge/DOI-10.5281%2Fzenodo.20819379-blue?style=flat-square" alt="DOI"/></a>
74
+ </p>
75
+
68
76
  Shared hardware objects — with standard values — for the HWO direct-imaging
69
77
  simulation suite.
70
78
 
@@ -1,5 +1,14 @@
1
1
  # optixstuff
2
2
 
3
+ <p align="center">
4
+ <a href="https://pypi.org/project/optixstuff/"><img src="https://img.shields.io/pypi/v/optixstuff.svg?style=flat-square&logo=pypi" alt="PyPI"/></a>
5
+ <a href="https://optixstuff.readthedocs.io"><img src="https://readthedocs.org/projects/optixstuff/badge/?version=latest&style=flat-square" alt="Documentation Status"/></a>
6
+ <a href="https://github.com/CoreySpohn/optixstuff/actions/workflows/ci.yml"><img src="https://img.shields.io/github/actions/workflow/status/CoreySpohn/optixstuff/ci.yml?branch=main&style=flat-square&logo=github&label=tests" alt="Tests"/></a>
7
+ <a href="https://github.com/CoreySpohn/optixstuff/blob/main/LICENSE"><img src="https://img.shields.io/badge/License-MIT-blue.svg?style=flat-square" alt="License"/></a>
8
+ <a href="https://github.com/CoreySpohn/optixstuff/blob/main/pyproject.toml"><img src="https://img.shields.io/badge/python-3.12%2B-blue.svg?style=flat-square&logo=python" alt="Python 3.12+"/></a>
9
+ <a href="https://doi.org/10.5281/zenodo.20819379"><img src="https://img.shields.io/badge/DOI-10.5281%2Fzenodo.20819379-blue?style=flat-square" alt="DOI"/></a>
10
+ </p>
11
+
3
12
  Shared hardware objects — with standard values — for the HWO direct-imaging
4
13
  simulation suite.
5
14
 
@@ -40,7 +40,6 @@ docs = [
40
40
  test = [
41
41
  "pytest>=7.3.2",
42
42
  "hypothesis>=6.79.1",
43
- "pytest-cov>=1.0",
44
43
  "pytest-xdist>=2.5",
45
44
  "pytest-testmon>=2.0.7",
46
45
  "pytest-markdown-docs>=0.5.0",
@@ -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 = '4.0.0'
22
- __version_tuple__ = version_tuple = (4, 0, 0)
21
+ __version__ = version = '4.0.1'
22
+ __version_tuple__ = version_tuple = (4, 0, 1)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -103,7 +103,7 @@ class YippyCoronagraph(AbstractTableCoronagraph):
103
103
  """Mean stellar leakage per (lambda/D)^2 from the YIP interpolation table.
104
104
 
105
105
  yippy tabulates the fraction of the star's light per pixel, so the
106
- value is divided by the pixel's solid angle, ``pixel_scale_lod**2``,
106
+ value is divided by the stellar pixel's solid angle,
107
107
  to meet the contract of :meth:`AbstractCoronagraph.core_mean_intensity`.
108
108
  The backend interpolates over the stellar diameter axis when present;
109
109
  otherwise it accepts and ignores the diameter.
@@ -116,7 +116,13 @@ class YippyCoronagraph(AbstractTableCoronagraph):
116
116
  queried wavelength; 0 means a point star.
117
117
  """
118
118
  per_pixel = self._backend.core_mean_intensity(separation_lod, stellar_diam_lod)
119
- return per_pixel / self._backend.pixel_scale_lod**2
119
+ return (
120
+ per_pixel
121
+ / getattr(
122
+ self._backend, "stellar_pixel_scale_lod", self._backend.pixel_scale_lod
123
+ )
124
+ ** 2
125
+ )
120
126
 
121
127
  def occulter_transmission(
122
128
  self,
@@ -139,6 +145,68 @@ class YippyCoronagraph(AbstractTableCoronagraph):
139
145
  """Stellar leakage PSF from the YIP stellar intensity model."""
140
146
  return self._backend.stellar_intens(0.0)
141
147
 
148
+ def stellar_map(
149
+ self,
150
+ wavelength_nm: ArrayLike,
151
+ stellar_diam_lod: ArrayLike,
152
+ *,
153
+ pixel_scale_lod: ArrayLike,
154
+ shape: tuple[int, int],
155
+ ) -> Array:
156
+ """Resample stellar flux in the backend's stellar reference frame."""
157
+ method = getattr(self._backend, "stellar_map", None)
158
+ if method is None:
159
+ return super().stellar_map(
160
+ wavelength_nm,
161
+ stellar_diam_lod,
162
+ pixel_scale_lod=pixel_scale_lod,
163
+ shape=shape,
164
+ )
165
+ return method(
166
+ wavelength_nm,
167
+ stellar_diam_lod,
168
+ pixel_scale_lod=pixel_scale_lod,
169
+ shape=shape,
170
+ )
171
+
172
+ def source_psfs(
173
+ self,
174
+ wavelength_nm: ArrayLike,
175
+ x_lod: ArrayLike,
176
+ y_lod: ArrayLike,
177
+ *,
178
+ pixel_scale_lod: ArrayLike,
179
+ shape: tuple[int, int],
180
+ ) -> Array:
181
+ """Resample source flux in the backend's off-axis reference frame."""
182
+ method = getattr(self._backend, "source_psfs", None)
183
+ if method is None:
184
+ return super().source_psfs(
185
+ wavelength_nm,
186
+ x_lod,
187
+ y_lod,
188
+ pixel_scale_lod=pixel_scale_lod,
189
+ shape=shape,
190
+ )
191
+ return method(
192
+ wavelength_nm, x_lod, y_lod, pixel_scale_lod=pixel_scale_lod, shape=shape
193
+ )
194
+
195
+ def background_transmission(
196
+ self,
197
+ wavelength_nm: ArrayLike,
198
+ *,
199
+ pixel_scale_lod: ArrayLike,
200
+ shape: tuple[int, int],
201
+ ) -> Array:
202
+ """Resample sky values in the backend's sky reference frame."""
203
+ method = getattr(self._backend, "background_transmission", None)
204
+ if method is None:
205
+ return super().background_transmission(
206
+ wavelength_nm, pixel_scale_lod=pixel_scale_lod, shape=shape
207
+ )
208
+ return method(wavelength_nm, pixel_scale_lod=pixel_scale_lod, shape=shape)
209
+
142
210
  def off_axis_psf(
143
211
  self,
144
212
  wavelength_nm: ArrayLike,
@@ -166,7 +234,7 @@ class YippyCoronagraph(AbstractTableCoronagraph):
166
234
  Same units as :meth:`core_mean_intensity`, so multiplying by
167
235
  :meth:`core_area` gives the floor as a fraction of the star's light.
168
236
  yippy's own ``noise_floor_ayo`` is per pixel and is divided by the
169
- pixel's solid angle, ``pixel_scale_lod**2``. Not part of the
237
+ stellar pixel's solid angle. Not part of the
170
238
  AbstractCoronagraph contract -- downstream ETCs should compute
171
239
  noise floors as pure functions.
172
240
 
@@ -183,7 +251,13 @@ class YippyCoronagraph(AbstractTableCoronagraph):
183
251
  per_pixel = (
184
252
  self._backend.core_mean_intensity(separation_lod, stellar_diam_lod) / ppf
185
253
  )
186
- return per_pixel / self._backend.pixel_scale_lod**2
254
+ return (
255
+ per_pixel
256
+ / getattr(
257
+ self._backend, "stellar_pixel_scale_lod", self._backend.pixel_scale_lod
258
+ )
259
+ ** 2
260
+ )
187
261
 
188
262
  def raw_contrast(self, separation_lod: ArrayLike) -> ArrayLike:
189
263
  """Raw contrast from the YIP interpolation table."""
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