BornSim 0.5.5__tar.gz → 0.5.7__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 (121) hide show
  1. {bornsim-0.5.5 → bornsim-0.5.7}/.zenodo.json +2 -2
  2. bornsim-0.5.7/BornSim.egg-info/PKG-INFO +216 -0
  3. {bornsim-0.5.5 → bornsim-0.5.7}/BornSim.egg-info/SOURCES.txt +2 -0
  4. {bornsim-0.5.5 → bornsim-0.5.7}/BornSim.egg-info/requires.txt +1 -5
  5. {bornsim-0.5.5 → bornsim-0.5.7}/CITATION.cff +1 -1
  6. bornsim-0.5.7/PKG-INFO +216 -0
  7. bornsim-0.5.7/README.rst +176 -0
  8. bornsim-0.5.7/bornsim/_version.py +1 -0
  9. {bornsim-0.5.5 → bornsim-0.5.7}/conda.recipe/meta.yaml +1 -1
  10. bornsim-0.5.7/docs/images/bornsim_medium_opacity_3d.png +0 -0
  11. bornsim-0.5.7/docs/images/bornsim_spf_surface_3d.png +0 -0
  12. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/conf.py +4 -3
  13. {bornsim-0.5.5 → bornsim-0.5.7}/pyproject.toml +2 -6
  14. bornsim-0.5.5/BornSim.egg-info/PKG-INFO +0 -536
  15. bornsim-0.5.5/PKG-INFO +0 -536
  16. bornsim-0.5.5/README.rst +0 -492
  17. bornsim-0.5.5/bornsim/_version.py +0 -1
  18. {bornsim-0.5.5 → bornsim-0.5.7}/.coveragerc +0 -0
  19. {bornsim-0.5.5 → bornsim-0.5.7}/.pre-commit-config.yaml +0 -0
  20. {bornsim-0.5.5 → bornsim-0.5.7}/BornSim.egg-info/dependency_links.txt +0 -0
  21. {bornsim-0.5.5 → bornsim-0.5.7}/BornSim.egg-info/top_level.txt +0 -0
  22. {bornsim-0.5.5 → bornsim-0.5.7}/CONTRIBUTING.md +0 -0
  23. {bornsim-0.5.5 → bornsim-0.5.7}/LICENSE +0 -0
  24. {bornsim-0.5.5 → bornsim-0.5.7}/MANIFEST.in +0 -0
  25. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/__init__.py +0 -0
  26. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/angular_data.py +0 -0
  27. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/api.py +0 -0
  28. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/directions.py +0 -0
  29. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/ensemble.py +0 -0
  30. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/ensemble_sampling.py +0 -0
  31. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/geometry.py +0 -0
  32. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/green.py +0 -0
  33. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/grid.py +0 -0
  34. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/material.py +0 -0
  35. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/medium/__init__.py +0 -0
  36. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/medium/base.py +0 -0
  37. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/medium/random_medium.py +0 -0
  38. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/medium/random_spheres.py +0 -0
  39. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/results.py +0 -0
  40. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/rotation.py +0 -0
  41. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/sampling.py +0 -0
  42. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/series.py +0 -0
  43. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/solver.py +0 -0
  44. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/source.py +0 -0
  45. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/units.py +0 -0
  46. {bornsim-0.5.5 → bornsim-0.5.7}/bornsim/volume.py +0 -0
  47. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/README.rst +0 -0
  48. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/born_orders/README.rst +0 -0
  49. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/born_orders/born_interference.py +0 -0
  50. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/born_orders/compare_orders.py +0 -0
  51. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/random_media/README.rst +0 -0
  52. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/random_media/covariance_models.py +0 -0
  53. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/random_media/phase_function.py +0 -0
  54. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/random_media/random_medium.py +0 -0
  55. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/random_media/random_spheres.py +0 -0
  56. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/random_media/theory_random_fields.py +0 -0
  57. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/random_media/wavelength_dependence.py +0 -0
  58. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/results/README.rst +0 -0
  59. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/results/result_plots.py +0 -0
  60. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/results/save_load_results.py +0 -0
  61. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/structured_media/README.rst +0 -0
  62. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/structured_media/dielectric_sphere.py +0 -0
  63. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/structured_media/structured_media.py +0 -0
  64. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/structured_media/theory_directional_interference.py +0 -0
  65. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/validation/README.rst +0 -0
  66. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/validation/angular_convergence.py +0 -0
  67. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/validation/ensemble_sampling.py +0 -0
  68. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/validation/finite_size_comparison.py +0 -0
  69. {bornsim-0.5.5 → bornsim-0.5.7}/docs/examples/validation/grid_refinement.py +0 -0
  70. {bornsim-0.5.5 → bornsim-0.5.7}/docs/images/branding-prompts.rst +0 -0
  71. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/_static/favicon.png +0 -0
  72. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/_static/favicon.svg +0 -0
  73. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/_static/logo.png +0 -0
  74. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/_static/logo.svg +0 -0
  75. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/_static/phase_function.svg +0 -0
  76. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/api.rst +0 -0
  77. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/development.rst +0 -0
  78. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/examples.rst +0 -0
  79. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/gallery_config.py +0 -0
  80. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/getting_started.rst +0 -0
  81. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/guide.rst +0 -0
  82. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/index.rst +0 -0
  83. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/medium_visualization.rst +0 -0
  84. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/overview.rst +0 -0
  85. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/research.rst +0 -0
  86. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/resources.rst +0 -0
  87. {bornsim-0.5.5 → bornsim-0.5.7}/docs/source/theory.rst +0 -0
  88. {bornsim-0.5.5 → bornsim-0.5.7}/makefile +0 -0
  89. {bornsim-0.5.5 → bornsim-0.5.7}/pytest.ini +0 -0
  90. {bornsim-0.5.5 → bornsim-0.5.7}/setup.cfg +0 -0
  91. {bornsim-0.5.5 → bornsim-0.5.7}/tests/analytical/reference.py +0 -0
  92. {bornsim-0.5.5 → bornsim-0.5.7}/tests/analytical/test_model.py +0 -0
  93. {bornsim-0.5.5 → bornsim-0.5.7}/tests/analytical/test_numerical_reference.py +0 -0
  94. {bornsim-0.5.5 → bornsim-0.5.7}/tests/conftest.py +0 -0
  95. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_api.py +0 -0
  96. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_api_keywords.py +0 -0
  97. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_api_ownership.py +0 -0
  98. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_api_scope.py +0 -0
  99. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_configuration.py +0 -0
  100. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_directional_api.py +0 -0
  101. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_directions.py +0 -0
  102. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_engine.py +0 -0
  103. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_explicit_physics.py +0 -0
  104. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_geometry.py +0 -0
  105. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_media.py +0 -0
  106. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_medium_composition.py +0 -0
  107. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_medium_metadata.py +0 -0
  108. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_plot_contract.py +0 -0
  109. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_random_spheres.py +0 -0
  110. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_result.py +0 -0
  111. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_result_contract.py +0 -0
  112. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_rotation.py +0 -0
  113. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_series.py +0 -0
  114. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_unit_contract.py +0 -0
  115. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_units.py +0 -0
  116. {bornsim-0.5.5 → bornsim-0.5.7}/tests/numerical/test_volume_plotting.py +0 -0
  117. {bornsim-0.5.5 → bornsim-0.5.7}/tests/packaging/test_release_tools.py +0 -0
  118. {bornsim-0.5.5 → bornsim-0.5.7}/tools/check_release.py +0 -0
  119. {bornsim-0.5.5 → bornsim-0.5.7}/tools/check_wheel.py +0 -0
  120. {bornsim-0.5.5 → bornsim-0.5.7}/tools/next_release_version.py +0 -0
  121. {bornsim-0.5.5 → bornsim-0.5.7}/tools/release_tag.py +0 -0
@@ -8,11 +8,11 @@
8
8
  }
9
9
  ],
10
10
  "license": "mit",
11
- "version": "0.5.5",
11
+ "version": "0.5.7",
12
12
  "keywords": [
13
13
  "Born approximation",
14
14
  "light scattering",
15
15
  "random media"
16
16
  ],
17
- "publication_date": "2026-10-21"
17
+ "publication_date": "2026-10-22"
18
18
  }
@@ -0,0 +1,216 @@
1
+ Metadata-Version: 2.4
2
+ Name: BornSim
3
+ Version: 0.5.7
4
+ Summary: Vector Born-series scattering from continuous random dielectric media
5
+ Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
6
+ License-Expression: MIT
7
+ Keywords: born approximation,light scattering,random media,tissue optics
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Science/Research
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Topic :: Scientific/Engineering :: Physics
17
+ Classifier: Topic :: Scientific/Engineering :: Visualization
18
+ Requires-Python: >=3.11
19
+ Description-Content-Type: text/x-rst
20
+ License-File: LICENSE
21
+ Requires-Dist: numpy<3,>=1.24
22
+ Requires-Dist: TypedUnit>=0.2.9
23
+ Requires-Dist: pint<0.26,>=0.24
24
+ Requires-Dist: matplotlib<4,>=3.7
25
+ Requires-Dist: plotly<7,>=6
26
+ Provides-Extra: testing
27
+ Requires-Dist: pytest<10,>=8; extra == "testing"
28
+ Requires-Dist: pytest-cov<8,>=5; extra == "testing"
29
+ Provides-Extra: test
30
+ Requires-Dist: BornSim[testing]; extra == "test"
31
+ Provides-Extra: documentation
32
+ Requires-Dist: MartinPdeS-docs<0.3,>=0.2.5; extra == "documentation"
33
+ Provides-Extra: dev
34
+ Requires-Dist: ruff<1,>=0.11; extra == "dev"
35
+ Requires-Dist: mypy<2,>=1.11; extra == "dev"
36
+ Requires-Dist: build<2,>=1.2; extra == "dev"
37
+ Requires-Dist: twine<7,>=6; extra == "dev"
38
+ Requires-Dist: pre-commit<5,>=4; extra == "dev"
39
+ Dynamic: license-file
40
+
41
+ .. image:: docs/source/_static/logo.png
42
+ :alt: BornSim logo
43
+ :width: 100%
44
+
45
+ BornSim
46
+ =======
47
+
48
+ **Vector Born-series scattering from continuous, isotropic random media.**
49
+
50
+ .. list-table::
51
+ :widths: 50 50
52
+ :width: 100%
53
+ :header-rows: 0
54
+ :class: badge-table
55
+
56
+ * - Python
57
+ - |python|
58
+ * - Documentation
59
+ - |docs|
60
+ * - Tests
61
+ - |tests|
62
+ * - Quality
63
+ - |quality|
64
+ * - Coverage
65
+ - |coverage|
66
+ * - Release
67
+ - |release|
68
+ * - License
69
+ - |license|
70
+
71
+ BornSim models how light scatters from three-dimensional refractive-index
72
+ fluctuations. Build a random or structured medium, solve its coherent Born
73
+ series, and inspect angular scattering, phase functions, :math:`\mu_s`,
74
+ anisotropy :math:`g`, and reduced scattering :math:`\mu_s'`.
75
+
76
+ .. list-table::
77
+ :widths: 50 50
78
+ :class: image-table
79
+
80
+ * - **3D medium opacity**
81
+ - **3D SPF surface**
82
+ * - .. image:: docs/images/bornsim_medium_opacity_3d.png
83
+ :alt: Three-dimensional random medium rendered with increasing opacity
84
+ :width: 100%
85
+ - .. image:: docs/images/bornsim_spf_surface_3d.png
86
+ :alt: Three-dimensional scattering phase-function surface
87
+ :width: 100%
88
+
89
+ The left view shows the simulated refractive-index volume; opacity is a visual
90
+ encoding, not absorption. The right view shows the normalized scattering phase
91
+ function in direction space. Both figures are generated from the same
92
+ BornSim-style workflow below.
93
+
94
+ Quick start
95
+ -----------
96
+
97
+ .. code-block:: python
98
+
99
+ from bornsim import EnsembleSampling, Grid, Solver, Source
100
+ from bornsim.medium.random_medium import GaussianMedium
101
+ from bornsim.units import ureg
102
+
103
+ grid = Grid(shape=(16, 16, 16), spacing=50 * ureg.nanometer)
104
+ medium = GaussianMedium(
105
+ background_refractive_index=1.33,
106
+ refractive_index_std=0.01,
107
+ correlation_length=100 * ureg.nanometer,
108
+ )
109
+
110
+ solver = Solver(
111
+ source=Source(wavelength=633 * ureg.nanometer),
112
+ order=3,
113
+ )
114
+
115
+ result = solver.ensemble(
116
+ medium=medium,
117
+ grid=grid,
118
+ ensemble_sampling=EnsembleSampling(realizations=4, seed=42),
119
+ )
120
+
121
+ print(result.mu_s.to("1 / millimeter"))
122
+ print(result.g)
123
+ print(result.mu_s_prime.to("1 / millimeter"))
124
+ result.plot()
125
+
126
+ For one fixed structured sample, use ``solver.solve(target=volume)``. The
127
+ result can also be visualized directly:
128
+
129
+ .. code-block:: python
130
+
131
+ volume = medium.to_volume(grid=grid, seed=42)
132
+ medium_figure = volume.plot_3d(
133
+ field="refractive_index",
134
+ opacity_scale="increasing",
135
+ )
136
+ phase_figure = solver.solve(target=volume).plot_phase_function(view="3d")
137
+ medium_figure.write_html("medium.html", include_plotlyjs=True)
138
+ phase_figure.write_html("phase_function.html", include_plotlyjs=True)
139
+
140
+ What BornSim models
141
+ -------------------
142
+
143
+ * **Media:** Gaussian, exponential, and Whittle–Matérn random fields, seeded
144
+ random spheres, and composable structured geometry.
145
+ * **Numerics:** vector volume-integral propagation with configurable Born order,
146
+ angular quadrature, grid spacing, and ensemble sampling.
147
+ * **Results:** differential scattering, full directional phase functions,
148
+ cross sections, uncertainty estimates, saved provenance, and Matplotlib or
149
+ Plotly visualizations.
150
+ * **Units:** explicit physical units for wavelengths, lengths, angles, and
151
+ scattering coefficients through ``bornsim.units.ureg``.
152
+
153
+ Installation
154
+ ------------
155
+
156
+ BornSim requires Python 3.11 or newer.
157
+
158
+ .. code-block:: console
159
+
160
+ $ python -m pip install BornSim
161
+
162
+ For development:
163
+
164
+ .. code-block:: console
165
+
166
+ $ git clone https://github.com/MartinPdeS/BornSim.git
167
+ $ cd BornSim
168
+ $ python -m pip install -e ".[testing,documentation]"
169
+ $ python -m pytest tests
170
+
171
+ Learn more
172
+ ----------
173
+
174
+ * `Documentation <https://martinpdes.github.io/BornSim/docs/latest/>`_ —
175
+ theory, API reference, numerical conventions, and visualization guidance.
176
+ * `Examples <https://martinpdes.github.io/BornSim/gallery/index.html>`_ —
177
+ random media, structured samples, Born orders, validation, and result plots.
178
+ * `Medium visualization guide <https://martinpdes.github.io/BornSim/docs/latest/medium_visualization.html>`_ —
179
+ interactive 3D volume and phase-function views.
180
+ * `Repository <https://github.com/MartinPdeS/BornSim>`_ — issues and
181
+ contributions.
182
+
183
+ Scientific scope
184
+ ----------------
185
+
186
+ BornSim uses the linearized dielectric contrast
187
+ :math:`\delta\varepsilon \approx 2 n_0 \delta n`. Its coefficients describe
188
+ finite numerical samples and are not automatically intrinsic infinite-medium
189
+ transport coefficients. Check grid, angular, sample-size, synthesis-box, and
190
+ ensemble convergence before interpreting results quantitatively.
191
+
192
+ License
193
+ -------
194
+
195
+ BornSim is released under the MIT License. See `LICENSE <https://github.com/MartinPdeS/BornSim/blob/master/LICENSE>`_.
196
+
197
+ .. |python| image:: https://img.shields.io/badge/Python-3.11%2B-3776AB.svg
198
+ :alt: Python 3.11 or newer
199
+ :target: https://www.python.org/
200
+ .. |docs| image:: https://github.com/MartinPdeS/BornSim/actions/workflows/deploy_documentation.yml/badge.svg
201
+ :alt: Documentation build status
202
+ :target: https://martinpdes.github.io/BornSim/docs/latest/
203
+ .. |tests| image:: https://github.com/MartinPdeS/BornSim/actions/workflows/tests.yml/badge.svg
204
+ :alt: Test status
205
+ :target: https://github.com/MartinPdeS/BornSim/actions/workflows/tests.yml
206
+ .. |quality| image:: https://github.com/MartinPdeS/BornSim/actions/workflows/quality.yml/badge.svg
207
+ :alt: Static quality check status
208
+ :target: https://github.com/MartinPdeS/BornSim/actions/workflows/quality.yml
209
+ .. |coverage| image:: https://raw.githubusercontent.com/MartinPdeS/BornSim/python-coverage-comment-action-data/badge.svg
210
+ :alt: Test coverage
211
+ .. |release| image:: https://img.shields.io/github/v/tag/MartinPdeS/BornSim.svg
212
+ :alt: Latest release tag
213
+ :target: https://github.com/MartinPdeS/BornSim/tags
214
+ .. |license| image:: https://img.shields.io/github/license/MartinPdeS/BornSim.svg
215
+ :alt: MIT license
216
+ :target: https://github.com/MartinPdeS/BornSim/blob/master/LICENSE
@@ -61,6 +61,8 @@ docs/examples/validation/angular_convergence.py
61
61
  docs/examples/validation/ensemble_sampling.py
62
62
  docs/examples/validation/finite_size_comparison.py
63
63
  docs/examples/validation/grid_refinement.py
64
+ docs/images/bornsim_medium_opacity_3d.png
65
+ docs/images/bornsim_spf_surface_3d.png
64
66
  docs/images/branding-prompts.rst
65
67
  docs/source/api.rst
66
68
  docs/source/conf.py
@@ -12,11 +12,7 @@ twine<7,>=6
12
12
  pre-commit<5,>=4
13
13
 
14
14
  [documentation]
15
- MartinPdeS-docs<0.3,>=0.2.1
16
- sphinx<10,>=7
17
- pydata-sphinx-theme<0.20,>=0.16
18
- sphinx-gallery<1,>=0.19
19
- sphinx-design<1,>=0.6
15
+ MartinPdeS-docs<0.3,>=0.2.5
20
16
 
21
17
  [test]
22
18
  BornSim[testing]
@@ -2,7 +2,7 @@ cff-version: 1.2.0
2
2
  message: "If you use BornSim in research, please cite the software version used."
3
3
  title: "BornSim"
4
4
  type: software
5
- version: "0.5.5"
5
+ version: "0.5.7"
6
6
  authors:
7
7
  - family-names: "Poinsinet de Sivry-Houle"
8
8
  given-names: "Martin"
bornsim-0.5.7/PKG-INFO ADDED
@@ -0,0 +1,216 @@
1
+ Metadata-Version: 2.4
2
+ Name: BornSim
3
+ Version: 0.5.7
4
+ Summary: Vector Born-series scattering from continuous random dielectric media
5
+ Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
6
+ License-Expression: MIT
7
+ Keywords: born approximation,light scattering,random media,tissue optics
8
+ Classifier: Development Status :: 3 - Alpha
9
+ Classifier: Intended Audience :: Science/Research
10
+ Classifier: Operating System :: OS Independent
11
+ Classifier: Programming Language :: Python :: 3
12
+ Classifier: Programming Language :: Python :: 3.11
13
+ Classifier: Programming Language :: Python :: 3.12
14
+ Classifier: Programming Language :: Python :: 3.13
15
+ Classifier: Programming Language :: Python :: 3.14
16
+ Classifier: Topic :: Scientific/Engineering :: Physics
17
+ Classifier: Topic :: Scientific/Engineering :: Visualization
18
+ Requires-Python: >=3.11
19
+ Description-Content-Type: text/x-rst
20
+ License-File: LICENSE
21
+ Requires-Dist: numpy<3,>=1.24
22
+ Requires-Dist: TypedUnit>=0.2.9
23
+ Requires-Dist: pint<0.26,>=0.24
24
+ Requires-Dist: matplotlib<4,>=3.7
25
+ Requires-Dist: plotly<7,>=6
26
+ Provides-Extra: testing
27
+ Requires-Dist: pytest<10,>=8; extra == "testing"
28
+ Requires-Dist: pytest-cov<8,>=5; extra == "testing"
29
+ Provides-Extra: test
30
+ Requires-Dist: BornSim[testing]; extra == "test"
31
+ Provides-Extra: documentation
32
+ Requires-Dist: MartinPdeS-docs<0.3,>=0.2.5; extra == "documentation"
33
+ Provides-Extra: dev
34
+ Requires-Dist: ruff<1,>=0.11; extra == "dev"
35
+ Requires-Dist: mypy<2,>=1.11; extra == "dev"
36
+ Requires-Dist: build<2,>=1.2; extra == "dev"
37
+ Requires-Dist: twine<7,>=6; extra == "dev"
38
+ Requires-Dist: pre-commit<5,>=4; extra == "dev"
39
+ Dynamic: license-file
40
+
41
+ .. image:: docs/source/_static/logo.png
42
+ :alt: BornSim logo
43
+ :width: 100%
44
+
45
+ BornSim
46
+ =======
47
+
48
+ **Vector Born-series scattering from continuous, isotropic random media.**
49
+
50
+ .. list-table::
51
+ :widths: 50 50
52
+ :width: 100%
53
+ :header-rows: 0
54
+ :class: badge-table
55
+
56
+ * - Python
57
+ - |python|
58
+ * - Documentation
59
+ - |docs|
60
+ * - Tests
61
+ - |tests|
62
+ * - Quality
63
+ - |quality|
64
+ * - Coverage
65
+ - |coverage|
66
+ * - Release
67
+ - |release|
68
+ * - License
69
+ - |license|
70
+
71
+ BornSim models how light scatters from three-dimensional refractive-index
72
+ fluctuations. Build a random or structured medium, solve its coherent Born
73
+ series, and inspect angular scattering, phase functions, :math:`\mu_s`,
74
+ anisotropy :math:`g`, and reduced scattering :math:`\mu_s'`.
75
+
76
+ .. list-table::
77
+ :widths: 50 50
78
+ :class: image-table
79
+
80
+ * - **3D medium opacity**
81
+ - **3D SPF surface**
82
+ * - .. image:: docs/images/bornsim_medium_opacity_3d.png
83
+ :alt: Three-dimensional random medium rendered with increasing opacity
84
+ :width: 100%
85
+ - .. image:: docs/images/bornsim_spf_surface_3d.png
86
+ :alt: Three-dimensional scattering phase-function surface
87
+ :width: 100%
88
+
89
+ The left view shows the simulated refractive-index volume; opacity is a visual
90
+ encoding, not absorption. The right view shows the normalized scattering phase
91
+ function in direction space. Both figures are generated from the same
92
+ BornSim-style workflow below.
93
+
94
+ Quick start
95
+ -----------
96
+
97
+ .. code-block:: python
98
+
99
+ from bornsim import EnsembleSampling, Grid, Solver, Source
100
+ from bornsim.medium.random_medium import GaussianMedium
101
+ from bornsim.units import ureg
102
+
103
+ grid = Grid(shape=(16, 16, 16), spacing=50 * ureg.nanometer)
104
+ medium = GaussianMedium(
105
+ background_refractive_index=1.33,
106
+ refractive_index_std=0.01,
107
+ correlation_length=100 * ureg.nanometer,
108
+ )
109
+
110
+ solver = Solver(
111
+ source=Source(wavelength=633 * ureg.nanometer),
112
+ order=3,
113
+ )
114
+
115
+ result = solver.ensemble(
116
+ medium=medium,
117
+ grid=grid,
118
+ ensemble_sampling=EnsembleSampling(realizations=4, seed=42),
119
+ )
120
+
121
+ print(result.mu_s.to("1 / millimeter"))
122
+ print(result.g)
123
+ print(result.mu_s_prime.to("1 / millimeter"))
124
+ result.plot()
125
+
126
+ For one fixed structured sample, use ``solver.solve(target=volume)``. The
127
+ result can also be visualized directly:
128
+
129
+ .. code-block:: python
130
+
131
+ volume = medium.to_volume(grid=grid, seed=42)
132
+ medium_figure = volume.plot_3d(
133
+ field="refractive_index",
134
+ opacity_scale="increasing",
135
+ )
136
+ phase_figure = solver.solve(target=volume).plot_phase_function(view="3d")
137
+ medium_figure.write_html("medium.html", include_plotlyjs=True)
138
+ phase_figure.write_html("phase_function.html", include_plotlyjs=True)
139
+
140
+ What BornSim models
141
+ -------------------
142
+
143
+ * **Media:** Gaussian, exponential, and Whittle–Matérn random fields, seeded
144
+ random spheres, and composable structured geometry.
145
+ * **Numerics:** vector volume-integral propagation with configurable Born order,
146
+ angular quadrature, grid spacing, and ensemble sampling.
147
+ * **Results:** differential scattering, full directional phase functions,
148
+ cross sections, uncertainty estimates, saved provenance, and Matplotlib or
149
+ Plotly visualizations.
150
+ * **Units:** explicit physical units for wavelengths, lengths, angles, and
151
+ scattering coefficients through ``bornsim.units.ureg``.
152
+
153
+ Installation
154
+ ------------
155
+
156
+ BornSim requires Python 3.11 or newer.
157
+
158
+ .. code-block:: console
159
+
160
+ $ python -m pip install BornSim
161
+
162
+ For development:
163
+
164
+ .. code-block:: console
165
+
166
+ $ git clone https://github.com/MartinPdeS/BornSim.git
167
+ $ cd BornSim
168
+ $ python -m pip install -e ".[testing,documentation]"
169
+ $ python -m pytest tests
170
+
171
+ Learn more
172
+ ----------
173
+
174
+ * `Documentation <https://martinpdes.github.io/BornSim/docs/latest/>`_ —
175
+ theory, API reference, numerical conventions, and visualization guidance.
176
+ * `Examples <https://martinpdes.github.io/BornSim/gallery/index.html>`_ —
177
+ random media, structured samples, Born orders, validation, and result plots.
178
+ * `Medium visualization guide <https://martinpdes.github.io/BornSim/docs/latest/medium_visualization.html>`_ —
179
+ interactive 3D volume and phase-function views.
180
+ * `Repository <https://github.com/MartinPdeS/BornSim>`_ — issues and
181
+ contributions.
182
+
183
+ Scientific scope
184
+ ----------------
185
+
186
+ BornSim uses the linearized dielectric contrast
187
+ :math:`\delta\varepsilon \approx 2 n_0 \delta n`. Its coefficients describe
188
+ finite numerical samples and are not automatically intrinsic infinite-medium
189
+ transport coefficients. Check grid, angular, sample-size, synthesis-box, and
190
+ ensemble convergence before interpreting results quantitatively.
191
+
192
+ License
193
+ -------
194
+
195
+ BornSim is released under the MIT License. See `LICENSE <https://github.com/MartinPdeS/BornSim/blob/master/LICENSE>`_.
196
+
197
+ .. |python| image:: https://img.shields.io/badge/Python-3.11%2B-3776AB.svg
198
+ :alt: Python 3.11 or newer
199
+ :target: https://www.python.org/
200
+ .. |docs| image:: https://github.com/MartinPdeS/BornSim/actions/workflows/deploy_documentation.yml/badge.svg
201
+ :alt: Documentation build status
202
+ :target: https://martinpdes.github.io/BornSim/docs/latest/
203
+ .. |tests| image:: https://github.com/MartinPdeS/BornSim/actions/workflows/tests.yml/badge.svg
204
+ :alt: Test status
205
+ :target: https://github.com/MartinPdeS/BornSim/actions/workflows/tests.yml
206
+ .. |quality| image:: https://github.com/MartinPdeS/BornSim/actions/workflows/quality.yml/badge.svg
207
+ :alt: Static quality check status
208
+ :target: https://github.com/MartinPdeS/BornSim/actions/workflows/quality.yml
209
+ .. |coverage| image:: https://raw.githubusercontent.com/MartinPdeS/BornSim/python-coverage-comment-action-data/badge.svg
210
+ :alt: Test coverage
211
+ .. |release| image:: https://img.shields.io/github/v/tag/MartinPdeS/BornSim.svg
212
+ :alt: Latest release tag
213
+ :target: https://github.com/MartinPdeS/BornSim/tags
214
+ .. |license| image:: https://img.shields.io/github/license/MartinPdeS/BornSim.svg
215
+ :alt: MIT license
216
+ :target: https://github.com/MartinPdeS/BornSim/blob/master/LICENSE
@@ -0,0 +1,176 @@
1
+ .. image:: docs/source/_static/logo.png
2
+ :alt: BornSim logo
3
+ :width: 100%
4
+
5
+ BornSim
6
+ =======
7
+
8
+ **Vector Born-series scattering from continuous, isotropic random media.**
9
+
10
+ .. list-table::
11
+ :widths: 50 50
12
+ :width: 100%
13
+ :header-rows: 0
14
+ :class: badge-table
15
+
16
+ * - Python
17
+ - |python|
18
+ * - Documentation
19
+ - |docs|
20
+ * - Tests
21
+ - |tests|
22
+ * - Quality
23
+ - |quality|
24
+ * - Coverage
25
+ - |coverage|
26
+ * - Release
27
+ - |release|
28
+ * - License
29
+ - |license|
30
+
31
+ BornSim models how light scatters from three-dimensional refractive-index
32
+ fluctuations. Build a random or structured medium, solve its coherent Born
33
+ series, and inspect angular scattering, phase functions, :math:`\mu_s`,
34
+ anisotropy :math:`g`, and reduced scattering :math:`\mu_s'`.
35
+
36
+ .. list-table::
37
+ :widths: 50 50
38
+ :class: image-table
39
+
40
+ * - **3D medium opacity**
41
+ - **3D SPF surface**
42
+ * - .. image:: docs/images/bornsim_medium_opacity_3d.png
43
+ :alt: Three-dimensional random medium rendered with increasing opacity
44
+ :width: 100%
45
+ - .. image:: docs/images/bornsim_spf_surface_3d.png
46
+ :alt: Three-dimensional scattering phase-function surface
47
+ :width: 100%
48
+
49
+ The left view shows the simulated refractive-index volume; opacity is a visual
50
+ encoding, not absorption. The right view shows the normalized scattering phase
51
+ function in direction space. Both figures are generated from the same
52
+ BornSim-style workflow below.
53
+
54
+ Quick start
55
+ -----------
56
+
57
+ .. code-block:: python
58
+
59
+ from bornsim import EnsembleSampling, Grid, Solver, Source
60
+ from bornsim.medium.random_medium import GaussianMedium
61
+ from bornsim.units import ureg
62
+
63
+ grid = Grid(shape=(16, 16, 16), spacing=50 * ureg.nanometer)
64
+ medium = GaussianMedium(
65
+ background_refractive_index=1.33,
66
+ refractive_index_std=0.01,
67
+ correlation_length=100 * ureg.nanometer,
68
+ )
69
+
70
+ solver = Solver(
71
+ source=Source(wavelength=633 * ureg.nanometer),
72
+ order=3,
73
+ )
74
+
75
+ result = solver.ensemble(
76
+ medium=medium,
77
+ grid=grid,
78
+ ensemble_sampling=EnsembleSampling(realizations=4, seed=42),
79
+ )
80
+
81
+ print(result.mu_s.to("1 / millimeter"))
82
+ print(result.g)
83
+ print(result.mu_s_prime.to("1 / millimeter"))
84
+ result.plot()
85
+
86
+ For one fixed structured sample, use ``solver.solve(target=volume)``. The
87
+ result can also be visualized directly:
88
+
89
+ .. code-block:: python
90
+
91
+ volume = medium.to_volume(grid=grid, seed=42)
92
+ medium_figure = volume.plot_3d(
93
+ field="refractive_index",
94
+ opacity_scale="increasing",
95
+ )
96
+ phase_figure = solver.solve(target=volume).plot_phase_function(view="3d")
97
+ medium_figure.write_html("medium.html", include_plotlyjs=True)
98
+ phase_figure.write_html("phase_function.html", include_plotlyjs=True)
99
+
100
+ What BornSim models
101
+ -------------------
102
+
103
+ * **Media:** Gaussian, exponential, and Whittle–Matérn random fields, seeded
104
+ random spheres, and composable structured geometry.
105
+ * **Numerics:** vector volume-integral propagation with configurable Born order,
106
+ angular quadrature, grid spacing, and ensemble sampling.
107
+ * **Results:** differential scattering, full directional phase functions,
108
+ cross sections, uncertainty estimates, saved provenance, and Matplotlib or
109
+ Plotly visualizations.
110
+ * **Units:** explicit physical units for wavelengths, lengths, angles, and
111
+ scattering coefficients through ``bornsim.units.ureg``.
112
+
113
+ Installation
114
+ ------------
115
+
116
+ BornSim requires Python 3.11 or newer.
117
+
118
+ .. code-block:: console
119
+
120
+ $ python -m pip install BornSim
121
+
122
+ For development:
123
+
124
+ .. code-block:: console
125
+
126
+ $ git clone https://github.com/MartinPdeS/BornSim.git
127
+ $ cd BornSim
128
+ $ python -m pip install -e ".[testing,documentation]"
129
+ $ python -m pytest tests
130
+
131
+ Learn more
132
+ ----------
133
+
134
+ * `Documentation <https://martinpdes.github.io/BornSim/docs/latest/>`_ —
135
+ theory, API reference, numerical conventions, and visualization guidance.
136
+ * `Examples <https://martinpdes.github.io/BornSim/gallery/index.html>`_ —
137
+ random media, structured samples, Born orders, validation, and result plots.
138
+ * `Medium visualization guide <https://martinpdes.github.io/BornSim/docs/latest/medium_visualization.html>`_ —
139
+ interactive 3D volume and phase-function views.
140
+ * `Repository <https://github.com/MartinPdeS/BornSim>`_ — issues and
141
+ contributions.
142
+
143
+ Scientific scope
144
+ ----------------
145
+
146
+ BornSim uses the linearized dielectric contrast
147
+ :math:`\delta\varepsilon \approx 2 n_0 \delta n`. Its coefficients describe
148
+ finite numerical samples and are not automatically intrinsic infinite-medium
149
+ transport coefficients. Check grid, angular, sample-size, synthesis-box, and
150
+ ensemble convergence before interpreting results quantitatively.
151
+
152
+ License
153
+ -------
154
+
155
+ BornSim is released under the MIT License. See `LICENSE <https://github.com/MartinPdeS/BornSim/blob/master/LICENSE>`_.
156
+
157
+ .. |python| image:: https://img.shields.io/badge/Python-3.11%2B-3776AB.svg
158
+ :alt: Python 3.11 or newer
159
+ :target: https://www.python.org/
160
+ .. |docs| image:: https://github.com/MartinPdeS/BornSim/actions/workflows/deploy_documentation.yml/badge.svg
161
+ :alt: Documentation build status
162
+ :target: https://martinpdes.github.io/BornSim/docs/latest/
163
+ .. |tests| image:: https://github.com/MartinPdeS/BornSim/actions/workflows/tests.yml/badge.svg
164
+ :alt: Test status
165
+ :target: https://github.com/MartinPdeS/BornSim/actions/workflows/tests.yml
166
+ .. |quality| image:: https://github.com/MartinPdeS/BornSim/actions/workflows/quality.yml/badge.svg
167
+ :alt: Static quality check status
168
+ :target: https://github.com/MartinPdeS/BornSim/actions/workflows/quality.yml
169
+ .. |coverage| image:: https://raw.githubusercontent.com/MartinPdeS/BornSim/python-coverage-comment-action-data/badge.svg
170
+ :alt: Test coverage
171
+ .. |release| image:: https://img.shields.io/github/v/tag/MartinPdeS/BornSim.svg
172
+ :alt: Latest release tag
173
+ :target: https://github.com/MartinPdeS/BornSim/tags
174
+ .. |license| image:: https://img.shields.io/github/license/MartinPdeS/BornSim.svg
175
+ :alt: MIT license
176
+ :target: https://github.com/MartinPdeS/BornSim/blob/master/LICENSE
@@ -0,0 +1 @@
1
+ __version__ = version = "0.5.7"
@@ -1,6 +1,6 @@
1
1
  package:
2
2
  name: bornsim
3
- version: 0.5.5
3
+ version: 0.5.7
4
4
 
5
5
  source:
6
6
  path: ..
@@ -43,12 +43,13 @@ globals().update(
43
43
  "../examples/validation",
44
44
  ],
45
45
  },
46
+ html_css_files=["layout.css"],
46
47
  )
47
48
  )
48
49
 
49
- html_css_files += ["layout.css"]
50
- html_context.update({"doc_path": "docs/source", "default_mode": "dark"})
51
-
50
+ # The wordmark and project identity are already visible in the header; keep
51
+ # the generated Sphinx/theme credit lines out of the documentation footer.
52
+ html_theme_options["footer_end"] = []
52
53
 
53
54
  def write_interactive_media(app, exception):
54
55
  """Export browser volume views for HTML documentation builds."""