BornSim 0.2.8__tar.gz → 0.3.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.
Files changed (118) hide show
  1. {bornsim-0.2.8 → bornsim-0.3.0}/.zenodo.json +1 -1
  2. {bornsim-0.2.8 → bornsim-0.3.0/BornSim.egg-info}/PKG-INFO +1 -1
  3. {bornsim-0.2.8 → bornsim-0.3.0}/BornSim.egg-info/SOURCES.txt +1 -0
  4. {bornsim-0.2.8 → bornsim-0.3.0}/CITATION.cff +1 -1
  5. {bornsim-0.2.8/BornSim.egg-info → bornsim-0.3.0}/PKG-INFO +1 -1
  6. bornsim-0.3.0/bornsim/_version.py +1 -0
  7. {bornsim-0.2.8 → bornsim-0.3.0}/conda.recipe/meta.yaml +1 -1
  8. {bornsim-0.2.8 → bornsim-0.3.0}/docs/source/index.rst +7 -0
  9. bornsim-0.3.0/docs/source/research.rst +168 -0
  10. {bornsim-0.2.8 → bornsim-0.3.0}/pyproject.toml +1 -1
  11. bornsim-0.2.8/bornsim/_version.py +0 -1
  12. {bornsim-0.2.8 → bornsim-0.3.0}/.coveragerc +0 -0
  13. {bornsim-0.2.8 → bornsim-0.3.0}/.pre-commit-config.yaml +0 -0
  14. {bornsim-0.2.8 → bornsim-0.3.0}/BornSim.egg-info/dependency_links.txt +0 -0
  15. {bornsim-0.2.8 → bornsim-0.3.0}/BornSim.egg-info/requires.txt +0 -0
  16. {bornsim-0.2.8 → bornsim-0.3.0}/BornSim.egg-info/top_level.txt +0 -0
  17. {bornsim-0.2.8 → bornsim-0.3.0}/CONTRIBUTING.md +0 -0
  18. {bornsim-0.2.8 → bornsim-0.3.0}/LICENSE +0 -0
  19. {bornsim-0.2.8 → bornsim-0.3.0}/MANIFEST.in +0 -0
  20. {bornsim-0.2.8 → bornsim-0.3.0}/README.rst +0 -0
  21. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/__init__.py +0 -0
  22. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/_archives.py +0 -0
  23. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/_result_plotting.py +0 -0
  24. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/_result_validation.py +0 -0
  25. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/_validation.py +0 -0
  26. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/_volume_plotting.py +0 -0
  27. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/angular_data.py +0 -0
  28. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/api.py +0 -0
  29. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/directions.py +0 -0
  30. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/ensemble.py +0 -0
  31. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/ensemble_sampling.py +0 -0
  32. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/geometry.py +0 -0
  33. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/green.py +0 -0
  34. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/grid.py +0 -0
  35. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/material.py +0 -0
  36. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/medium/__init__.py +0 -0
  37. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/medium/base.py +0 -0
  38. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/medium/random_medium.py +0 -0
  39. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/medium/random_spheres.py +0 -0
  40. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/results.py +0 -0
  41. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/rotation.py +0 -0
  42. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/sampling.py +0 -0
  43. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/series.py +0 -0
  44. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/solver.py +0 -0
  45. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/source.py +0 -0
  46. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/units.py +0 -0
  47. {bornsim-0.2.8 → bornsim-0.3.0}/bornsim/volume.py +0 -0
  48. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/README.rst +0 -0
  49. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/born_orders/README.rst +0 -0
  50. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/born_orders/born_interference.py +0 -0
  51. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/born_orders/compare_orders.py +0 -0
  52. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/random_media/README.rst +0 -0
  53. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/random_media/covariance_models.py +0 -0
  54. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/random_media/phase_function.py +0 -0
  55. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/random_media/random_medium.py +0 -0
  56. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/random_media/random_spheres.py +0 -0
  57. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/random_media/theory_random_fields.py +0 -0
  58. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/random_media/wavelength_dependence.py +0 -0
  59. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/results/README.rst +0 -0
  60. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/results/result_plots.py +0 -0
  61. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/results/save_load_results.py +0 -0
  62. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/structured_media/README.rst +0 -0
  63. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/structured_media/dielectric_sphere.py +0 -0
  64. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/structured_media/structured_media.py +0 -0
  65. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/structured_media/theory_directional_interference.py +0 -0
  66. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/validation/README.rst +0 -0
  67. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/validation/angular_convergence.py +0 -0
  68. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/validation/ensemble_sampling.py +0 -0
  69. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/validation/finite_size_comparison.py +0 -0
  70. {bornsim-0.2.8 → bornsim-0.3.0}/docs/examples/validation/grid_refinement.py +0 -0
  71. {bornsim-0.2.8 → bornsim-0.3.0}/docs/images/branding-prompts.rst +0 -0
  72. {bornsim-0.2.8 → bornsim-0.3.0}/docs/source/_static/favicon.png +0 -0
  73. {bornsim-0.2.8 → bornsim-0.3.0}/docs/source/_static/logo.png +0 -0
  74. {bornsim-0.2.8 → bornsim-0.3.0}/docs/source/_static/phase_function.svg +0 -0
  75. {bornsim-0.2.8 → bornsim-0.3.0}/docs/source/api.rst +0 -0
  76. {bornsim-0.2.8 → bornsim-0.3.0}/docs/source/conf.py +0 -0
  77. {bornsim-0.2.8 → bornsim-0.3.0}/docs/source/development.rst +0 -0
  78. {bornsim-0.2.8 → bornsim-0.3.0}/docs/source/examples.rst +0 -0
  79. {bornsim-0.2.8 → bornsim-0.3.0}/docs/source/gallery_config.py +0 -0
  80. {bornsim-0.2.8 → bornsim-0.3.0}/docs/source/getting_started.rst +0 -0
  81. {bornsim-0.2.8 → bornsim-0.3.0}/docs/source/guide.rst +0 -0
  82. {bornsim-0.2.8 → bornsim-0.3.0}/docs/source/medium_visualization.rst +0 -0
  83. {bornsim-0.2.8 → bornsim-0.3.0}/docs/source/overview.rst +0 -0
  84. {bornsim-0.2.8 → bornsim-0.3.0}/docs/source/resources.rst +0 -0
  85. {bornsim-0.2.8 → bornsim-0.3.0}/docs/source/theory.rst +0 -0
  86. {bornsim-0.2.8 → bornsim-0.3.0}/makefile +0 -0
  87. {bornsim-0.2.8 → bornsim-0.3.0}/pytest.ini +0 -0
  88. {bornsim-0.2.8 → bornsim-0.3.0}/setup.cfg +0 -0
  89. {bornsim-0.2.8 → bornsim-0.3.0}/tests/analytical/reference.py +0 -0
  90. {bornsim-0.2.8 → bornsim-0.3.0}/tests/analytical/test_model.py +0 -0
  91. {bornsim-0.2.8 → bornsim-0.3.0}/tests/analytical/test_numerical_reference.py +0 -0
  92. {bornsim-0.2.8 → bornsim-0.3.0}/tests/conftest.py +0 -0
  93. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_api.py +0 -0
  94. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_api_keywords.py +0 -0
  95. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_api_ownership.py +0 -0
  96. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_api_scope.py +0 -0
  97. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_configuration.py +0 -0
  98. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_directional_api.py +0 -0
  99. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_directions.py +0 -0
  100. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_engine.py +0 -0
  101. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_explicit_physics.py +0 -0
  102. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_geometry.py +0 -0
  103. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_media.py +0 -0
  104. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_medium_composition.py +0 -0
  105. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_medium_metadata.py +0 -0
  106. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_plot_contract.py +0 -0
  107. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_random_spheres.py +0 -0
  108. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_result.py +0 -0
  109. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_result_contract.py +0 -0
  110. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_series.py +0 -0
  111. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_unit_contract.py +0 -0
  112. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_units.py +0 -0
  113. {bornsim-0.2.8 → bornsim-0.3.0}/tests/numerical/test_volume_plotting.py +0 -0
  114. {bornsim-0.2.8 → bornsim-0.3.0}/tests/packaging/test_release_tools.py +0 -0
  115. {bornsim-0.2.8 → bornsim-0.3.0}/tools/check_release.py +0 -0
  116. {bornsim-0.2.8 → bornsim-0.3.0}/tools/check_wheel.py +0 -0
  117. {bornsim-0.2.8 → bornsim-0.3.0}/tools/next_release_version.py +0 -0
  118. {bornsim-0.2.8 → bornsim-0.3.0}/tools/release_tag.py +0 -0
@@ -8,7 +8,7 @@
8
8
  }
9
9
  ],
10
10
  "license": "mit",
11
- "version": "0.2.8",
11
+ "version": "0.3.0",
12
12
  "keywords": [
13
13
  "Born approximation",
14
14
  "light scattering",
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: BornSim
3
- Version: 0.2.8
3
+ Version: 0.3.0
4
4
  Summary: Vector Born-series scattering from continuous random dielectric media
5
5
  Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
6
6
  License-Expression: MIT
@@ -77,6 +77,7 @@ docs/source/guide.rst
77
77
  docs/source/index.rst
78
78
  docs/source/medium_visualization.rst
79
79
  docs/source/overview.rst
80
+ docs/source/research.rst
80
81
  docs/source/resources.rst
81
82
  docs/source/theory.rst
82
83
  docs/source/_static/favicon.png
@@ -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.2.8"
5
+ version: "0.3.0"
6
6
  authors:
7
7
  - family-names: "Poinsinet de Sivry-Houle"
8
8
  given-names: "Martin"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: BornSim
3
- Version: 0.2.8
3
+ Version: 0.3.0
4
4
  Summary: Vector Born-series scattering from continuous random dielectric media
5
5
  Author-email: Martin Poinsinet de Sivry-Houle <martin.poinsinet.de.sivry@gmail.com>
6
6
  License-Expression: MIT
@@ -0,0 +1 @@
1
+ __version__ = version = "0.3.0"
@@ -1,6 +1,6 @@
1
1
  package:
2
2
  name: bornsim
3
- version: 0.2.8
3
+ version: 0.3.0
4
4
 
5
5
  source:
6
6
  path: ..
@@ -33,6 +33,12 @@ refractive-index media.
33
33
 
34
34
  Find sources, media, solver settings, and result methods.
35
35
 
36
+ .. grid-item-card:: Research
37
+ :link: research
38
+ :link-type: doc
39
+
40
+ Design reproducible studies and assess physical and numerical limits.
41
+
36
42
  .. grid-item-card:: Resources
37
43
  :link: resources
38
44
  :link-type: doc
@@ -47,4 +53,5 @@ refractive-index media.
47
53
  Guide <guide>
48
54
  Examples <examples>
49
55
  API <api>
56
+ Research <research>
50
57
  Resources <resources>
@@ -0,0 +1,168 @@
1
+ Research uses
2
+ =============
3
+
4
+ BornSim helps investigate how a finite refractive-index field produces vector
5
+ scattering under the Born approximation. Use it to connect a proposed medium
6
+ structure to directional scattering, compare controlled model changes, and
7
+ check numerical sensitivity before interpreting a result physically.
8
+
9
+ Research questions
10
+ ------------------
11
+
12
+ Spatial covariance and scattering
13
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
14
+
15
+ Compare GaussianMedium, ExponentialMedium, and WhittleMaternMedium while holding
16
+ the background refractive index and fluctuation standard deviation fixed.
17
+ This separates the effect of spatial covariance from the one-point probability
18
+ distribution, which is Gaussian for all three random-field models. Vary the
19
+ correlation length or Matérn smoothness to study changes in angular scattering,
20
+ anisotropy, and finite-sample coefficients.
21
+
22
+ See :doc:`auto_examples/random_media/covariance_models` and
23
+ :doc:`auto_examples/random_media/phase_function` for numerical comparisons.
24
+ Equal correlation-length parameters across covariance families do not imply
25
+ identical real-space covariance profiles.
26
+
27
+ Geometry and coherent interference
28
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
29
+
30
+ Use StructuredMedium to build layers and shaped inclusions, or
31
+ RandomSphereMedium to generate seeded collections of nonoverlapping spheres.
32
+ Compare positions, shapes, or arrangements to investigate directional
33
+ interference. BornSim combines complex scattering amplitudes coherently within
34
+ each incident polarization and retains interference between Born orders.
35
+ Adding isolated intensities cannot reconstruct those cumulative results.
36
+
37
+ See :doc:`auto_examples/structured_media/theory_directional_interference` and
38
+ :doc:`auto_examples/born_orders/born_interference`. Random sphere collections use
39
+ sequential rejection sampling; they do not represent an equilibrium hard-sphere
40
+ ensemble.
41
+
42
+ Wavelength and approximation sensitivity
43
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
44
+
45
+ Sweep explicitly supplied wavelengths to explore spectral trends for a chosen
46
+ medium. The :doc:`auto_examples/random_media/wavelength_dependence` example
47
+ holds refractive indices fixed. Material dispersion requires you to supply
48
+ appropriate refractive indices at each wavelength.
49
+
50
+ Compare successive Born orders to assess sensitivity to the truncation.
51
+ Decreasing field terms alone do not establish convergence or accuracy. Compare
52
+ against an independent reference or another numerical method when making
53
+ quantitative claims.
54
+
55
+ A reproducible starting point
56
+ -----------------------------
57
+
58
+ This configuration is an illustrative finite-sample study, rather than a
59
+ validated description of a particular material. Choose physical parameters
60
+ from your research model or measurements, and refine the numerical settings
61
+ for the observables you intend to report.
62
+
63
+ .. code-block:: python
64
+
65
+ from bornsim import AngularSampling, EnsembleSampling, Grid, Solver, Source
66
+ from bornsim.medium.random_medium import GaussianMedium
67
+ from bornsim.units import ureg
68
+
69
+ grid = Grid(
70
+ shape=(8, 8, 8),
71
+ spacing=25 * ureg.nanometer,
72
+ )
73
+
74
+ medium = GaussianMedium(
75
+ background_refractive_index=1.33,
76
+ refractive_index_std=0.01,
77
+ correlation_length=50 * ureg.nanometer,
78
+ )
79
+
80
+ source = Source(wavelength=633 * ureg.nanometer)
81
+
82
+ sampling = AngularSampling(
83
+ start=0 * ureg.degree,
84
+ end=180 * ureg.degree,
85
+ n_points=91,
86
+ polar_samples=32,
87
+ azimuth_samples=16,
88
+ )
89
+
90
+ ensemble_sampling = EnsembleSampling(seeds=(42, 43, 44, 45))
91
+
92
+ solver = Solver(
93
+ source=source,
94
+ sampling=sampling,
95
+ order=2,
96
+ )
97
+
98
+ result = solver.ensemble(
99
+ medium=medium,
100
+ grid=grid,
101
+ ensemble_sampling=ensemble_sampling,
102
+ )
103
+
104
+ result.save(path="research-scattering.npz")
105
+
106
+ print(f"Finite-sample scattering coefficient: {result.mu_s}")
107
+
108
+ Inspect one realization from that ensemble in a separate plotting cell.
109
+ The three-dimensional view shows the finite input sample, rather than an
110
+ ensemble-averaged medium.
111
+
112
+ .. code-block:: python
113
+
114
+ import matplotlib.pyplot as plt
115
+
116
+ preview_volume = medium.to_volume(
117
+ grid=grid,
118
+ seed=ensemble_sampling.seeds[0],
119
+ )
120
+
121
+ medium_figure = preview_volume.plot_3d(
122
+ backend="matplotlib",
123
+ mode="slices",
124
+ field="refractive_index",
125
+ )
126
+
127
+ plt.show()
128
+
129
+ Controls for quantitative studies
130
+ ---------------------------------
131
+
132
+ Check voxel spacing at fixed physical sample size, then sample size at fixed
133
+ spacing. Refine the polar integration and azimuth sampling independently;
134
+ adding more plotted output angles does not replace integration refinement.
135
+ Increase the number of independent realizations to assess ensemble sampling
136
+ uncertainty. Reuse the same seed set across parameter comparisons to keep the
137
+ sampling protocol reproducible; the resulting comparisons are correlated.
138
+
139
+ BornSim currently accepts 2–32 voxels per axis. This limits the combination of
140
+ sample size and spatial resolution you can investigate. Boundary effects,
141
+ spectral truncation, and the synthesis box can affect random-field statistics.
142
+ The :doc:`examples` validation gallery demonstrates separate grid, angular,
143
+ ensemble, and finite-size checks.
144
+
145
+ Physical scope and reporting
146
+ ----------------------------
147
+
148
+ The implemented model uses real scalar refractive indices, an unpolarized plane
149
+ wave along +z, a uniform exterior background, and the linearized dielectric
150
+ contrast ``2 * background_refractive_index * delta_refractive_index``. Higher Born
151
+ orders do not restore the omitted quadratic refractive-index term. Strong
152
+ contrast, absorption, or more general illumination requires a model beyond
153
+ these assumptions. See :doc:`theory` for the equations and Green-tensor self-cell
154
+ convention.
155
+
156
+ Report the wavelength, refractive indices, medium statistics or geometry,
157
+ physical sample size, voxel spacing, angular settings, Born order, seed set,
158
+ and software version. Saved results retain units, amplitudes, and provenance;
159
+ they do not contain the original voxel field. Preserve manually constructed
160
+ fields and their generation procedure separately.
161
+
162
+ The integrated coefficients describe finite-sample cross sections divided by
163
+ sample volume. Do not present them as infinite-medium transport coefficients
164
+ without a separate justification of that limit. Ensemble standard errors
165
+ quantify realization sampling uncertainty, rather than discretization error
166
+ or uncertainty in the physical model. Normalized phase-function uncertainty
167
+ cannot be inferred simply by dividing differential-scattering error bars by
168
+ the mean integrated coefficient.
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
4
4
 
5
5
  [project]
6
6
  name = "BornSim"
7
- version = "0.2.8"
7
+ version = "0.3.0"
8
8
  description = "Vector Born-series scattering from continuous random dielectric media"
9
9
  readme = "README.rst"
10
10
  license = "MIT"
@@ -1 +0,0 @@
1
- __version__ = version = "0.2.8"
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
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