physicaloptix 2.3.0__tar.gz → 2.3.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 (73) hide show
  1. physicaloptix-2.3.1/.codespellrc +5 -0
  2. physicaloptix-2.3.1/.editorconfig +15 -0
  3. physicaloptix-2.3.1/.gitattributes +10 -0
  4. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/.gitignore +6 -2
  5. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/.pre-commit-config.yaml +6 -2
  6. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/CHANGELOG.md +8 -0
  7. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/PKG-INFO +42 -31
  8. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/README.md +5 -3
  9. physicaloptix-2.3.1/SECURITY.md +9 -0
  10. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/pyproject.toml +70 -24
  11. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/_version.py +2 -2
  12. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/instruments/roman.py +1 -0
  13. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/interop.py +8 -2
  14. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/speckle.py +1 -1
  15. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/.readthedocs.yaml +0 -0
  16. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/.zenodo.json +0 -0
  17. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/CITATION.cff +0 -0
  18. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/LICENSE +0 -0
  19. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/NOTICE +0 -0
  20. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/__init__.py +0 -0
  21. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/apertures.py +0 -0
  22. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/coatings.py +0 -0
  23. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/core/__init__.py +0 -0
  24. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/core/field.py +0 -0
  25. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/core/grid.py +0 -0
  26. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/data/eac1_ci_train.yaml +0 -0
  27. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/data/eac1_primary.yaml +0 -0
  28. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/detector.py +0 -0
  29. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/diagnostics.py +0 -0
  30. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/diff.py +0 -0
  31. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/elements/__init__.py +0 -0
  32. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/elements/base.py +0 -0
  33. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/elements/basis.py +0 -0
  34. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/elements/dispersive.py +0 -0
  35. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/elements/modes.py +0 -0
  36. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/elements/phase_screen.py +0 -0
  37. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/elements/vortex.py +0 -0
  38. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/elements/zernike_wfs.py +0 -0
  39. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/ifs.py +0 -0
  40. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/instruments/__init__.py +0 -0
  41. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/instruments/_proper_beam.py +0 -0
  42. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/instruments/_proper_ops.py +0 -0
  43. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/instruments/nircam.py +0 -0
  44. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/instruments/roman_full.py +0 -0
  45. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/linearize.py +0 -0
  46. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/multichannel.py +0 -0
  47. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/path.py +0 -0
  48. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/robustness.py +0 -0
  49. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/sources.py +0 -0
  50. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/stats.py +0 -0
  51. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/system.py +0 -0
  52. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/trains.py +0 -0
  53. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/transforms/__init__.py +0 -0
  54. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/transforms/cmft.py +0 -0
  55. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/transforms/fraunhofer.py +0 -0
  56. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/transforms/fresnel.py +0 -0
  57. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/viz/__init__.py +0 -0
  58. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/viz/_legacy.py +0 -0
  59. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/viz/_prepare.py +0 -0
  60. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/viz/_require.py +0 -0
  61. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/viz/boiling.py +0 -0
  62. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/viz/columns.py +0 -0
  63. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/viz/fields.py +0 -0
  64. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/viz/fresnel.py +0 -0
  65. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/viz/modes.py +0 -0
  66. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/viz/profiles.py +0 -0
  67. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/viz/propagation.py +0 -0
  68. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/viz/rays.py +0 -0
  69. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/viz/raytrace.py +0 -0
  70. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/viz/speckle.py +0 -0
  71. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/viz/train.py +0 -0
  72. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/src/physicaloptix/yip.py +0 -0
  73. {physicaloptix-2.3.0 → physicaloptix-2.3.1}/tools/check_internal_refs.py +0 -0
@@ -0,0 +1,5 @@
1
+ [codespell]
2
+ skip = .git,*.ipynb,uv.lock,*/_build,*.fits
3
+ # PROPER array sizes (dout, nin), lambda/D unit (lod), neutral density (ND),
4
+ # and the existing list of image arrays (datas).
5
+ ignore-words-list = dout,nin,lod,nd,datas
@@ -0,0 +1,15 @@
1
+ root = true
2
+
3
+ [*]
4
+ charset = utf-8
5
+ end_of_line = lf
6
+ insert_final_newline = true
7
+ trim_trailing_whitespace = true
8
+ indent_style = space
9
+ indent_size = 4
10
+
11
+ [*.{yml,yaml,json,toml}]
12
+ indent_size = 2
13
+
14
+ [Makefile]
15
+ indent_style = tab
@@ -0,0 +1,10 @@
1
+ * text=auto eol=lf
2
+ *.ipynb text eol=lf linguist-documentation
3
+ docs/** linguist-documentation
4
+ *.fits binary
5
+ *.npy binary
6
+ *.npz binary
7
+ *.png binary
8
+ *.pdf binary
9
+ uv.lock linguist-generated -diff
10
+ CHANGELOG.md linguist-generated
@@ -70,6 +70,7 @@ instance/
70
70
 
71
71
  # Sphinx documentation
72
72
  docs/_build/
73
+ docs/.build/
73
74
 
74
75
  # PyBuilder
75
76
  .pybuilder/
@@ -195,9 +196,9 @@ cython_debug/
195
196
  .abstra/
196
197
 
197
198
  # Visual Studio Code
198
- # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
199
+ # Visual Studio Code specific template is maintained in a separate VisualStudioCode.gitignore
199
200
  # that can be found at https://github.com/github/gitignore/blob/main/Global/VisualStudioCode.gitignore
200
- # and can be added to the global gitignore or merged into this file. However, if you prefer,
201
+ # and can be added to the global gitignore or merged into this file. However, if you prefer,
201
202
  # you could uncomment the following to ignore the entire vscode folder
202
203
  # .vscode/
203
204
  # Temporary file for partial code execution
@@ -219,3 +220,6 @@ __marimo__/
219
220
 
220
221
  # hatch-vcs generated version file
221
222
  *_version.py
223
+ .claude/
224
+ .jax_cache/
225
+ .DS_Store
@@ -15,13 +15,17 @@ repos:
15
15
  args: [--pytest-test-first]
16
16
  - id: end-of-file-fixer
17
17
  - repo: https://github.com/astral-sh/ruff-pre-commit
18
- rev: v0.15.2
18
+ rev: v0.17.3
19
19
  hooks:
20
20
  - id: ruff-check
21
21
  args: [--fix]
22
22
  - id: ruff-format
23
+ - repo: https://github.com/codespell-project/codespell
24
+ rev: v2.4.1
25
+ hooks:
26
+ - id: codespell
23
27
  - repo: https://github.com/compilerla/conventional-pre-commit
24
- rev: v4.3.0
28
+ rev: v4.4.0
25
29
  hooks:
26
30
  - id: conventional-pre-commit
27
31
  stages: [commit-msg]
@@ -1,5 +1,13 @@
1
1
  # Changelog
2
2
 
3
+ ## [2.3.1](https://github.com/CoreySpohn/physicaloptix/compare/v2.3.0...v2.3.1) (2026-11-05)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **interop:** accept stellar_diam_lod in core_mean_intensity ([4dbc6ef](https://github.com/CoreySpohn/physicaloptix/commit/4dbc6efa5a95532cab65def7c4638ac2ac6fc7e0))
9
+ * **physicaloptix:** assert focal mask is present before use ([4d5afa5](https://github.com/CoreySpohn/physicaloptix/commit/4d5afa578522c84f021317437d1fc8abff5ca1fb))
10
+
3
11
  ## [2.3.0](https://github.com/CoreySpohn/physicaloptix/compare/v2.2.0...v2.3.0) (2026-10-03)
4
12
 
5
13
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: physicaloptix
3
- Version: 2.3.0
3
+ Version: 2.3.1
4
4
  Summary: Physical optics (PSFs and diffraction) for the HWO direct imaging simulation suite
5
5
  Project-URL: Homepage, https://github.com/CoreySpohn/physicaloptix
6
6
  Project-URL: Issues, https://github.com/CoreySpohn/physicaloptix/issues
@@ -33,40 +33,49 @@ Classifier: Intended Audience :: Science/Research
33
33
  Classifier: License :: OSI Approved :: MIT License
34
34
  Classifier: Programming Language :: Python :: 3
35
35
  Classifier: Topic :: Scientific/Engineering :: Astronomy
36
- Requires-Python: >=3.11
37
- Requires-Dist: astropy
38
- Requires-Dist: equinox>=0.12.0
39
- Requires-Dist: hwoutils
40
- Requires-Dist: jax>=0.4.1
41
- Requires-Dist: jaxlib>=0.4.1
42
- Requires-Dist: jaxtyping
43
- Requires-Dist: numpy
36
+ Requires-Python: >=3.12
37
+ Requires-Dist: astropy>=6.1
38
+ Requires-Dist: equinox>=0.13.2
39
+ Requires-Dist: hwoutils>=1.10.0
40
+ Requires-Dist: jax>=0.8.1
41
+ Requires-Dist: jaxlib>=0.8.1
42
+ Requires-Dist: jaxtyping>=0.3.3
43
+ Requires-Dist: numpy>=2.0
44
44
  Requires-Dist: optixstuff>=3.0.0
45
- Requires-Dist: pyyaml
46
- Requires-Dist: scipy
45
+ Requires-Dist: pyyaml>=6.0.1
46
+ Requires-Dist: scipy>=1.13
47
47
  Provides-Extra: dev
48
- Requires-Dist: pre-commit; extra == 'dev'
48
+ Requires-Dist: pre-commit>=3.7.0; extra == 'dev'
49
49
  Provides-Extra: docs
50
- Requires-Dist: eyepiece; extra == 'docs'
51
- Requires-Dist: imageio-ffmpeg; extra == 'docs'
52
- Requires-Dist: ipython; extra == 'docs'
53
- Requires-Dist: matplotlib; extra == 'docs'
54
- Requires-Dist: myst-nb; extra == 'docs'
55
- Requires-Dist: sphinx; extra == 'docs'
56
- Requires-Dist: sphinx-autoapi; extra == 'docs'
57
- Requires-Dist: sphinx-autodoc-typehints; extra == 'docs'
58
- Requires-Dist: sphinx-book-theme; extra == 'docs'
59
- Requires-Dist: sphinxcontrib-mermaid; extra == 'docs'
50
+ Requires-Dist: eyepiece>=0.7.0; extra == 'docs'
51
+ Requires-Dist: imageio-ffmpeg>=0.5.1; extra == 'docs'
52
+ Requires-Dist: ipython>=8.24.0; extra == 'docs'
53
+ Requires-Dist: matplotlib>=3.11.0; extra == 'docs'
54
+ Requires-Dist: myst-nb>=1.2.0; extra == 'docs'
55
+ Requires-Dist: sphinx-autoapi>=3.6.0; extra == 'docs'
56
+ Requires-Dist: sphinx-autodoc-typehints>=3.0.1; extra == 'docs'
57
+ Requires-Dist: sphinx-book-theme>=1.1.4; extra == 'docs'
58
+ Requires-Dist: sphinx>=8.2.3; extra == 'docs'
59
+ Requires-Dist: sphinxcontrib-mermaid>=1.0.0; extra == 'docs'
60
60
  Provides-Extra: test
61
- Requires-Dist: hypothesis; extra == 'test'
62
- Requires-Dist: matplotlib; extra == 'test'
63
- Requires-Dist: nox; extra == 'test'
64
- Requires-Dist: pytest; extra == 'test'
65
- Requires-Dist: pytest-cov; extra == 'test'
66
- Requires-Dist: scipy; extra == 'test'
61
+ Requires-Dist: hcipy>=0.7.0; extra == 'test'
62
+ Requires-Dist: hypothesis>=6.79.1; extra == 'test'
63
+ Requires-Dist: lod-unit>=1.8.0; extra == 'test'
64
+ Requires-Dist: matplotlib>=3.11.0; extra == 'test'
65
+ Requires-Dist: psutil>=5.9.4; extra == 'test'
66
+ Requires-Dist: pytest-cov>=1.0; extra == 'test'
67
+ Requires-Dist: pytest-fail-slow>=0.1.0; extra == 'test'
68
+ Requires-Dist: pytest-markdown-docs>=0.5.0; extra == 'test'
69
+ Requires-Dist: pytest-testmon>=2.0.7; extra == 'test'
70
+ Requires-Dist: pytest-timeout>=1.3.1; extra == 'test'
71
+ Requires-Dist: pytest-xdist>=2.5; extra == 'test'
72
+ Requires-Dist: pytest>=7.3.2; extra == 'test'
73
+ Requires-Dist: scipy>=1.13; extra == 'test'
74
+ Requires-Dist: yippy>=2.10.6; extra == 'test'
67
75
  Provides-Extra: viz
68
76
  Requires-Dist: eyepiece>=0.7.0; extra == 'viz'
69
77
  Requires-Dist: hwostyle>=1.4.0; extra == 'viz'
78
+ Requires-Dist: matplotlib>=3.11.0; extra == 'viz'
70
79
  Description-Content-Type: text/markdown
71
80
 
72
81
  # physicaloptix
@@ -96,14 +105,16 @@ The key piece is `PathCoronagraph`, which implements optixstuff's
96
105
  wrap it, and hand it to any downstream tool. Its IWA and scalar performance
97
106
  curves are derived from the propagated PSFs at construction, never declared.
98
107
 
99
- ```python
108
+ Requires a configured optical path, pupil field, and output sampling.
109
+
110
+ ```python notest
100
111
  import physicaloptix as po
101
112
 
102
113
  coro = po.PathCoronagraph.from_path(
103
114
  core_path, pupil_field, diameter_m=6.0, owa_lod=32.0
104
115
  )
105
- psf = coro.on_axis_psf(600.0, pixel_scale_rad, npix) # unit-flux PSF out
106
- eta = coro.throughput(6.0, 600.0) # derived, not declared
116
+ psf = coro.on_axis_psf(600.0, pixel_scale_rad, npix) # unit-flux PSF out
117
+ eta = coro.throughput(6.0, 600.0) # derived, not declared
107
118
  ```
108
119
 
109
120
  ## What physicaloptix is *not*
@@ -25,14 +25,16 @@ The key piece is `PathCoronagraph`, which implements optixstuff's
25
25
  wrap it, and hand it to any downstream tool. Its IWA and scalar performance
26
26
  curves are derived from the propagated PSFs at construction, never declared.
27
27
 
28
- ```python
28
+ Requires a configured optical path, pupil field, and output sampling.
29
+
30
+ ```python notest
29
31
  import physicaloptix as po
30
32
 
31
33
  coro = po.PathCoronagraph.from_path(
32
34
  core_path, pupil_field, diameter_m=6.0, owa_lod=32.0
33
35
  )
34
- psf = coro.on_axis_psf(600.0, pixel_scale_rad, npix) # unit-flux PSF out
35
- eta = coro.throughput(6.0, 600.0) # derived, not declared
36
+ psf = coro.on_axis_psf(600.0, pixel_scale_rad, npix) # unit-flux PSF out
37
+ eta = coro.throughput(6.0, 600.0) # derived, not declared
36
38
  ```
37
39
 
38
40
  ## What physicaloptix is *not*
@@ -0,0 +1,9 @@
1
+ # Security policy
2
+
3
+ This is research software maintained by one person. Please report a vulnerability, for
4
+ example a leaked credential, a malicious dependency, or a workflow that could be abused, through
5
+ GitHub private vulnerability reporting: use "Report a vulnerability" on the Security tab of this
6
+ repository. If that is unavailable, email corey.a.spohn@nasa.gov with "SECURITY" in the subject.
7
+
8
+ Expect an acknowledgement within a week. Only the latest release receives fixes. Incorrect
9
+ numerical results are not security issues; please open an ordinary issue for those.
@@ -1,5 +1,5 @@
1
1
  [build-system]
2
- requires = ['hatchling', "hatch-fancy-pypi-readme", "hatch-vcs"]
2
+ requires = ['hatchling>=1.27.0', "hatch-fancy-pypi-readme>=25.1.0", "hatch-vcs>=0.4.0"]
3
3
  build-backend = "hatchling.build"
4
4
 
5
5
  [project]
@@ -7,7 +7,7 @@ name = "physicaloptix"
7
7
  description = "Physical optics (PSFs and diffraction) for the HWO direct imaging simulation suite"
8
8
  authors = [{ name = "Corey Spohn", email = "corey.a.spohn@nasa.gov" }]
9
9
  dynamic = ['readme', 'version']
10
- requires-python = ">=3.11"
10
+ requires-python = ">=3.12"
11
11
  license = { file = "LICENSE" }
12
12
  classifiers = [
13
13
  "Development Status :: 2 - Pre-Alpha",
@@ -20,33 +20,49 @@ classifiers = [
20
20
  # reader, and scipy (scipy.special.j1) of its round band-limited mask; both
21
21
  # were only transitive (optixstuff, jax) before and are declared here.
22
22
  dependencies = [
23
- "astropy",
24
- "equinox>=0.12.0",
25
- "hwoutils",
26
- "pyyaml",
27
- "jax>=0.4.1",
28
- "jaxlib>=0.4.1",
29
- "jaxtyping",
30
- "numpy",
23
+ "astropy>=6.1",
24
+ "equinox>=0.13.2",
25
+ "hwoutils>=1.10.0",
26
+ "pyyaml>=6.0.1",
27
+ "jax>=0.8.1",
28
+ "jaxlib>=0.8.1",
29
+ "jaxtyping>=0.3.3",
30
+ "numpy>=2.0",
31
31
  "optixstuff>=3.0.0",
32
- "scipy",
32
+ "scipy>=1.13",
33
33
  ]
34
34
 
35
35
  [project.optional-dependencies]
36
- dev = ["pre-commit"]
36
+ dev = ["pre-commit>=3.7.0"]
37
37
  docs = [
38
- "sphinx",
39
- "myst-nb",
40
- "sphinx-book-theme",
41
- "sphinx-autoapi",
42
- "sphinx_autodoc_typehints",
43
- "sphinxcontrib-mermaid",
44
- "ipython",
45
- "matplotlib",
46
- "eyepiece",
47
- "imageio-ffmpeg",
38
+ "sphinx>=8.2.3",
39
+ "myst-nb>=1.2.0",
40
+ "sphinx-book-theme>=1.1.4",
41
+ "sphinx-autoapi>=3.6.0",
42
+ "sphinx_autodoc_typehints>=3.0.1",
43
+ "sphinxcontrib-mermaid>=1.0.0",
44
+ "ipython>=8.24.0",
45
+ "matplotlib>=3.11.0",
46
+ "eyepiece>=0.7.0",
47
+ "imageio-ffmpeg>=0.5.1",
48
+ ]
49
+ test = [
50
+ "matplotlib>=3.11.0",
51
+ "pytest>=7.3.2",
52
+ "hypothesis>=6.79.1",
53
+ "pytest-cov>=1.0",
54
+ # The optional budget plugin uses psutil for portable memory measurements.
55
+ "psutil>=5.9.4",
56
+ "pytest-xdist>=2.5",
57
+ "pytest-testmon>=2.0.7",
58
+ "pytest-markdown-docs>=0.5.0",
59
+ "pytest-timeout>=1.3.1",
60
+ "pytest-fail-slow>=0.1.0",
61
+ "scipy>=1.13",
62
+ "yippy>=2.10.6",
63
+ "lod-unit>=1.8.0",
64
+ "hcipy>=0.7.0",
48
65
  ]
49
- test = ["matplotlib", "nox", "pytest", "hypothesis", "pytest-cov", "scipy"]
50
66
  # hwostyle is a DIRECT import of viz/train.py and viz/modes.py (cmaps.opd,
51
67
  # palette, roles), so it is declared here rather than relied on transitively
52
68
  # through eyepiece -- whose own pin (hwostyle>=1.3.0) would legally resolve a
@@ -55,7 +71,8 @@ test = ["matplotlib", "nox", "pytest", "hypothesis", "pytest-cov", "scipy"]
55
71
  # eyepiece 0.7.0 is the first release with phasor (per-arrow starts=),
56
72
  # which viz/fresnel.py calls; eyepiece.prepared (viz/_prepare.py,
57
73
  # viz/boiling.py) arrived in 0.5.0.
58
- viz = ["eyepiece>=0.7.0", "hwostyle>=1.4.0"]
74
+ # Visualization modules import matplotlib directly as well as through eyepiece.
75
+ viz = ["eyepiece>=0.7.0", "hwostyle>=1.4.0", "matplotlib>=3.11.0"]
59
76
 
60
77
  [project.urls]
61
78
  Homepage = "https://github.com/CoreySpohn/physicaloptix"
@@ -91,6 +108,13 @@ dev = [
91
108
  ]
92
109
 
93
110
  [tool.pytest.ini_options]
111
+ filterwarnings = [
112
+ "error",
113
+ # tol_colors calls deprecated Colormap.set_bad while constructing its palettes.
114
+ "ignore:The set_bad function will be deprecated in a future version[.]:PendingDeprecationWarning:tol_colors",
115
+ # JAX 0.8.1 dot_general reverse mode projects complex cotangents to real inputs.
116
+ "ignore:Casting complex values to real discards the imaginary part:numpy.exceptions.ComplexWarning:jax[.]_src[.]lax[.]lax$:5518",
117
+ ]
94
118
  # The default run is COMPLETE: the external-reference gates are the point of
95
119
  # this suite, so nothing is deselected without the caller asking. A handful of
96
120
  # gates rebuild a full yield package or a full EAC-1 chain and dominate the
@@ -99,6 +123,7 @@ dev = [
99
123
  # gates hold large x64 EAC-1 arrays and one worker per core exhausts memory
100
124
  # long before parallelism pays.
101
125
  markers = [
126
+ "medium: tests with a 30-second default time budget",
102
127
  "slow: rebuilds a full yield package or EAC-1 chain (tens of seconds up)",
103
128
  ]
104
129
 
@@ -107,3 +132,24 @@ packages = ["src/physicaloptix"]
107
132
 
108
133
  [tool.hatch.build.targets.sdist]
109
134
  exclude = ["/scripts", "/docs", "/tests", "/.github"]
135
+
136
+ [tool.testbudget]
137
+ library = "physicaloptix"
138
+ mode = "report"
139
+ unit_s = 5
140
+ medium_s = 30
141
+ slow_s = 300
142
+
143
+ [tool.deptry]
144
+ known_first_party = ["physicaloptix"]
145
+ optional_dependencies_dev_groups = ["dev", "docs", "test"]
146
+
147
+ [tool.deptry.per_rule_ignores]
148
+ # JAX loads its compiled backend; keep the explicit minimum version constraint.
149
+ DEP002 = ["jaxlib"]
150
+
151
+ [tool.ty.environment]
152
+ python-version = "3.11"
153
+
154
+ [tool.ty.src]
155
+ include = ["src/physicaloptix"]
@@ -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 = '2.3.0'
22
- __version_tuple__ = version_tuple = (2, 3, 0)
21
+ __version__ = version = '2.3.1'
22
+ __version_tuple__ = version_tuple = (2, 3, 1)
23
23
 
24
24
  __commit_id__ = commit_id = None
@@ -507,6 +507,7 @@ class RomanCompact(eqx.Module):
507
507
  return data
508
508
 
509
509
  def _focal_mask(self, field, wl, stages):
510
+ assert self.fpm is not None, "fpm must be present when applying a focal mask"
510
511
  m = self.fpm.shape[0]
511
512
  dout = self.fpm_sampling_lod * self.fpm_lam0_nm / wl
512
513
  focal = Grid.focal(m, dout)
@@ -221,8 +221,14 @@ class PathCoronagraph(AbstractCoronagraph):
221
221
  """Photometric core area (above-half-max region) in (lambda/D)^2."""
222
222
  return self._interp(self.curve_core_area, separation_lod)
223
223
 
224
- def core_mean_intensity(self, separation_lod, wavelength_nm, *, time_s=0.0):
225
- """Mean stellar intensity density over the core, in (lambda/D)^-2."""
224
+ def core_mean_intensity(
225
+ self, separation_lod, wavelength_nm, *, time_s=0.0, stellar_diam_lod=0.0
226
+ ):
227
+ """Mean stellar intensity density over the core, in (lambda/D)^-2.
228
+
229
+ The curves are propagated for a point star, so stellar_diam_lod is
230
+ accepted for the coronagraph contract and ignored.
231
+ """
226
232
  return self._interp(self.curve_core_mean_intensity, separation_lod)
227
233
 
228
234
  def occulter_transmission(self, separation_lod, wavelength_nm, *, time_s=0.0):
@@ -1096,7 +1096,7 @@ class SpeckleProcess(eqx.Module):
1096
1096
  per focal-plane pixel, with ``Gamma = sum_k rms_k^2 |g_k|^2``,
1097
1097
  ``P = sum_k rms_k^2 g_k^2``, ``I_C = |e_nom|^2``,
1098
1098
  ``phi_C = angle(e_nom)`` and pinning-quadrature variance
1099
- ``Var(X) = (Gamma + Re[P e^{-2 i phi_C}]) / 2``,
1099
+ ``Var(X) = (Gamma + Re[P e^{-2 i phi_C}]) / 2``::
1100
1100
 
1101
1101
  E[delta] = Gamma / norm
1102
1102
  Var[delta] = (4 I_C Var(X) + Gamma^2 + |P|^2) / norm^2
File without changes
File without changes