BornSim 0.5.0__tar.gz → 0.5.4__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.
Potentially problematic release.
This version of BornSim might be problematic. Click here for more details.
- {bornsim-0.5.0 → bornsim-0.5.4}/.zenodo.json +2 -2
- {bornsim-0.5.0 → bornsim-0.5.4/BornSim.egg-info}/PKG-INFO +4 -2
- {bornsim-0.5.0 → bornsim-0.5.4}/BornSim.egg-info/SOURCES.txt +2 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/BornSim.egg-info/requires.txt +3 -1
- {bornsim-0.5.0 → bornsim-0.5.4}/CITATION.cff +1 -1
- {bornsim-0.5.0/BornSim.egg-info → bornsim-0.5.4}/PKG-INFO +4 -2
- bornsim-0.5.4/bornsim/_version.py +1 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/conda.recipe/meta.yaml +3 -2
- bornsim-0.5.4/docs/source/_static/favicon.svg +1 -0
- bornsim-0.5.4/docs/source/_static/logo.svg +1 -0
- bornsim-0.5.4/docs/source/conf.py +104 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/pyproject.toml +15 -3
- {bornsim-0.5.0 → bornsim-0.5.4}/tools/release_tag.py +8 -1
- bornsim-0.5.0/bornsim/_version.py +0 -1
- bornsim-0.5.0/docs/source/conf.py +0 -153
- {bornsim-0.5.0 → bornsim-0.5.4}/.coveragerc +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/.pre-commit-config.yaml +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/BornSim.egg-info/dependency_links.txt +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/BornSim.egg-info/top_level.txt +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/CONTRIBUTING.md +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/LICENSE +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/MANIFEST.in +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/README.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/__init__.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/angular_data.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/api.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/directions.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/ensemble.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/ensemble_sampling.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/geometry.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/green.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/grid.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/material.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/medium/__init__.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/medium/base.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/medium/random_medium.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/medium/random_spheres.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/results.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/rotation.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/sampling.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/series.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/solver.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/source.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/units.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/bornsim/volume.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/README.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/born_orders/README.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/born_orders/born_interference.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/born_orders/compare_orders.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/random_media/README.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/random_media/covariance_models.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/random_media/phase_function.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/random_media/random_medium.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/random_media/random_spheres.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/random_media/theory_random_fields.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/random_media/wavelength_dependence.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/results/README.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/results/result_plots.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/results/save_load_results.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/structured_media/README.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/structured_media/dielectric_sphere.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/structured_media/structured_media.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/structured_media/theory_directional_interference.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/validation/README.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/validation/angular_convergence.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/validation/ensemble_sampling.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/validation/finite_size_comparison.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/validation/grid_refinement.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/images/branding-prompts.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/source/_static/favicon.png +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/source/_static/logo.png +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/source/_static/phase_function.svg +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/source/api.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/source/development.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/source/examples.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/source/gallery_config.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/source/getting_started.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/source/guide.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/source/index.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/source/medium_visualization.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/source/overview.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/source/research.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/source/resources.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/docs/source/theory.rst +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/makefile +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/pytest.ini +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/setup.cfg +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/analytical/reference.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/analytical/test_model.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/analytical/test_numerical_reference.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/conftest.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_api.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_api_keywords.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_api_ownership.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_api_scope.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_configuration.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_directional_api.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_directions.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_engine.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_explicit_physics.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_geometry.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_media.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_medium_composition.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_medium_metadata.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_plot_contract.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_random_spheres.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_result.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_result_contract.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_rotation.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_series.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_unit_contract.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_units.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/numerical/test_volume_plotting.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tests/packaging/test_release_tools.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tools/check_release.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tools/check_wheel.py +0 -0
- {bornsim-0.5.0 → bornsim-0.5.4}/tools/next_release_version.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: BornSim
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.4
|
|
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
|
|
@@ -19,7 +19,8 @@ Requires-Python: >=3.11
|
|
|
19
19
|
Description-Content-Type: text/x-rst
|
|
20
20
|
License-File: LICENSE
|
|
21
21
|
Requires-Dist: numpy<3,>=1.24
|
|
22
|
-
Requires-Dist: TypedUnit
|
|
22
|
+
Requires-Dist: TypedUnit>=0.2.9
|
|
23
|
+
Requires-Dist: pint<0.26,>=0.24
|
|
23
24
|
Requires-Dist: matplotlib<4,>=3.7
|
|
24
25
|
Requires-Dist: plotly<7,>=6
|
|
25
26
|
Provides-Extra: testing
|
|
@@ -28,6 +29,7 @@ Requires-Dist: pytest-cov<8,>=5; extra == "testing"
|
|
|
28
29
|
Provides-Extra: test
|
|
29
30
|
Requires-Dist: BornSim[testing]; extra == "test"
|
|
30
31
|
Provides-Extra: documentation
|
|
32
|
+
Requires-Dist: MartinPdeS-docs>=0.1.4; extra == "documentation"
|
|
31
33
|
Requires-Dist: sphinx<10,>=7; extra == "documentation"
|
|
32
34
|
Requires-Dist: pydata-sphinx-theme<0.20,>=0.16; extra == "documentation"
|
|
33
35
|
Requires-Dist: sphinx-gallery<1,>=0.19; extra == "documentation"
|
|
@@ -76,7 +76,9 @@ docs/source/research.rst
|
|
|
76
76
|
docs/source/resources.rst
|
|
77
77
|
docs/source/theory.rst
|
|
78
78
|
docs/source/_static/favicon.png
|
|
79
|
+
docs/source/_static/favicon.svg
|
|
79
80
|
docs/source/_static/logo.png
|
|
81
|
+
docs/source/_static/logo.svg
|
|
80
82
|
docs/source/_static/phase_function.svg
|
|
81
83
|
tests/conftest.py
|
|
82
84
|
tests/analytical/reference.py
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
numpy<3,>=1.24
|
|
2
|
-
TypedUnit
|
|
2
|
+
TypedUnit>=0.2.9
|
|
3
|
+
pint<0.26,>=0.24
|
|
3
4
|
matplotlib<4,>=3.7
|
|
4
5
|
plotly<7,>=6
|
|
5
6
|
|
|
@@ -11,6 +12,7 @@ twine<7,>=6
|
|
|
11
12
|
pre-commit<5,>=4
|
|
12
13
|
|
|
13
14
|
[documentation]
|
|
15
|
+
MartinPdeS-docs>=0.1.4
|
|
14
16
|
sphinx<10,>=7
|
|
15
17
|
pydata-sphinx-theme<0.20,>=0.16
|
|
16
18
|
sphinx-gallery<1,>=0.19
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: BornSim
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.4
|
|
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
|
|
@@ -19,7 +19,8 @@ Requires-Python: >=3.11
|
|
|
19
19
|
Description-Content-Type: text/x-rst
|
|
20
20
|
License-File: LICENSE
|
|
21
21
|
Requires-Dist: numpy<3,>=1.24
|
|
22
|
-
Requires-Dist: TypedUnit
|
|
22
|
+
Requires-Dist: TypedUnit>=0.2.9
|
|
23
|
+
Requires-Dist: pint<0.26,>=0.24
|
|
23
24
|
Requires-Dist: matplotlib<4,>=3.7
|
|
24
25
|
Requires-Dist: plotly<7,>=6
|
|
25
26
|
Provides-Extra: testing
|
|
@@ -28,6 +29,7 @@ Requires-Dist: pytest-cov<8,>=5; extra == "testing"
|
|
|
28
29
|
Provides-Extra: test
|
|
29
30
|
Requires-Dist: BornSim[testing]; extra == "test"
|
|
30
31
|
Provides-Extra: documentation
|
|
32
|
+
Requires-Dist: MartinPdeS-docs>=0.1.4; extra == "documentation"
|
|
31
33
|
Requires-Dist: sphinx<10,>=7; extra == "documentation"
|
|
32
34
|
Requires-Dist: pydata-sphinx-theme<0.20,>=0.16; extra == "documentation"
|
|
33
35
|
Requires-Dist: sphinx-gallery<1,>=0.19; extra == "documentation"
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = version = "0.5.4"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
package:
|
|
2
2
|
name: bornsim
|
|
3
|
-
version: 0.5.
|
|
3
|
+
version: 0.5.4
|
|
4
4
|
|
|
5
5
|
source:
|
|
6
6
|
path: ..
|
|
@@ -18,7 +18,8 @@ requirements:
|
|
|
18
18
|
run:
|
|
19
19
|
- python {{ PY_VER }}.*
|
|
20
20
|
- numpy >=1.24,<3
|
|
21
|
-
- typedunit
|
|
21
|
+
- typedunit >=0.2.9
|
|
22
|
+
- pint >=0.24,<0.26
|
|
22
23
|
- matplotlib >=3.7,<4
|
|
23
24
|
- plotly >=6,<7
|
|
24
25
|
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 64 64"><circle cx="32" cy="32" r="29" fill="#172033"/><path fill="none" stroke="#5eead4" stroke-width="6" stroke-linecap="round" d="M10 32h12m-6-9c14 6 14 12 24 18m-24-18c14-6 14-12 24-18"/><circle cx="35" cy="32" r="6" fill="#fbbf24"/></svg>
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 380 96" role="img" aria-labelledby="t d"><title id="t">BornSim</title><desc id="d">Two clean wavefronts passing through a scattering point.</desc><path fill="none" stroke="#0f766e" stroke-width="8" stroke-linecap="round" d="M18 48h72m-42-20c22 10 22 30 44 40m-44-40c22-10 22-30 44-40"/><circle cx="142" cy="48" r="15" fill="#f59e0b"/><path fill="none" stroke="#2563eb" stroke-width="8" stroke-linecap="round" d="M168 48h48m-28-20c22 10 22 30 44 40m-44-40c22-10 22-30 44-40"/><text x="250" y="58" fill="#172033" font-family="system-ui,sans-serif" font-size="30" font-weight="650">BornSim</text></svg>
|
|
@@ -0,0 +1,104 @@
|
|
|
1
|
+
"""BornSim documentation configuration."""
|
|
2
|
+
|
|
3
|
+
import os
|
|
4
|
+
import sys
|
|
5
|
+
from pathlib import Path
|
|
6
|
+
|
|
7
|
+
sys.path.insert(0, str(Path(__file__).parent))
|
|
8
|
+
|
|
9
|
+
from bornsim import __version__
|
|
10
|
+
from bornsim.units import ureg
|
|
11
|
+
from martinpdes_docs import configure
|
|
12
|
+
|
|
13
|
+
project = "BornSim"
|
|
14
|
+
package = "BornSim"
|
|
15
|
+
repository = "MartinPdeS/BornSim"
|
|
16
|
+
author = "Martin Poinsinet de Sivry-Houle"
|
|
17
|
+
documentation_version = os.getenv("tag", "latest")
|
|
18
|
+
|
|
19
|
+
release = __version__
|
|
20
|
+
version = release
|
|
21
|
+
|
|
22
|
+
|
|
23
|
+
globals().update(
|
|
24
|
+
configure(
|
|
25
|
+
project=project,
|
|
26
|
+
package=package,
|
|
27
|
+
author=author,
|
|
28
|
+
repository=repository,
|
|
29
|
+
version=documentation_version,
|
|
30
|
+
logo="_static/logo.png",
|
|
31
|
+
favicon="_static/favicon.png",
|
|
32
|
+
sphinx_gallery_conf={
|
|
33
|
+
"examples_dirs": "../examples",
|
|
34
|
+
"gallery_dirs": "auto_examples",
|
|
35
|
+
"filename_pattern": r"\.py$",
|
|
36
|
+
"capture_repr": (),
|
|
37
|
+
"image_scrapers": ("matplotlib", "gallery_config.plotly_scraper"),
|
|
38
|
+
"abort_on_example_error": True,
|
|
39
|
+
"download_all_examples": False,
|
|
40
|
+
"backreferences_dir": None,
|
|
41
|
+
"reset_argv": "gallery_config.gallery_arguments",
|
|
42
|
+
"subsection_order": [
|
|
43
|
+
"../examples/random_media",
|
|
44
|
+
"../examples/structured_media",
|
|
45
|
+
"../examples/born_orders",
|
|
46
|
+
"../examples/results",
|
|
47
|
+
"../examples/validation",
|
|
48
|
+
],
|
|
49
|
+
},
|
|
50
|
+
)
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
extensions += ["sphinx.ext.mathjax"]
|
|
54
|
+
html_css_files += ["layout.css"]
|
|
55
|
+
html_context.update({"doc_path": "docs/source", "default_mode": "dark"})
|
|
56
|
+
|
|
57
|
+
|
|
58
|
+
def write_interactive_media(app, exception):
|
|
59
|
+
"""Export browser volume views for HTML documentation builds."""
|
|
60
|
+
|
|
61
|
+
if exception is not None or app.builder.format != "html":
|
|
62
|
+
return
|
|
63
|
+
|
|
64
|
+
output = Path(app.outdir) / "_static"
|
|
65
|
+
output.mkdir(exist_ok=True)
|
|
66
|
+
|
|
67
|
+
from bornsim import Grid
|
|
68
|
+
from bornsim.medium.random_medium import ExponentialMedium, GaussianMedium
|
|
69
|
+
|
|
70
|
+
grid = Grid(
|
|
71
|
+
shape=(16, 16, 16),
|
|
72
|
+
spacing=2.5e-08 * ureg.meter,
|
|
73
|
+
)
|
|
74
|
+
|
|
75
|
+
for correlation, medium_type in (("gaussian", GaussianMedium), ("exponential", ExponentialMedium)):
|
|
76
|
+
medium = medium_type(
|
|
77
|
+
refractive_index_std=0.01,
|
|
78
|
+
correlation_length=7.5e-08 * ureg.meter,
|
|
79
|
+
background_refractive_index=1.33,
|
|
80
|
+
)
|
|
81
|
+
|
|
82
|
+
volume = medium.to_volume(
|
|
83
|
+
grid=grid,
|
|
84
|
+
seed=42,
|
|
85
|
+
)
|
|
86
|
+
|
|
87
|
+
figure = volume.plot_3d(
|
|
88
|
+
backend="plotly",
|
|
89
|
+
mode="volume",
|
|
90
|
+
field="refractive_index",
|
|
91
|
+
surface_count=16,
|
|
92
|
+
opacity=0.2,
|
|
93
|
+
opacity_scale="increasing",
|
|
94
|
+
)
|
|
95
|
+
|
|
96
|
+
figure.update_layout(title=f"{correlation.capitalize()} random medium · higher refractive index is more opaque")
|
|
97
|
+
figure.write_html(
|
|
98
|
+
file=str(output / f"random-medium-{correlation}.html"),
|
|
99
|
+
include_plotlyjs=True,
|
|
100
|
+
)
|
|
101
|
+
|
|
102
|
+
|
|
103
|
+
def setup(app):
|
|
104
|
+
app.connect("build-finished", write_interactive_media)
|
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "BornSim"
|
|
7
|
-
version = "0.5.
|
|
7
|
+
version = "0.5.4"
|
|
8
8
|
description = "Vector Born-series scattering from continuous random dielectric media"
|
|
9
9
|
readme = "README.rst"
|
|
10
10
|
license = "MIT"
|
|
@@ -26,12 +26,24 @@ classifiers = [
|
|
|
26
26
|
"Topic :: Scientific/Engineering :: Visualization",
|
|
27
27
|
]
|
|
28
28
|
keywords = ["born approximation", "light scattering", "random media", "tissue optics"]
|
|
29
|
-
dependencies = [
|
|
29
|
+
dependencies = [
|
|
30
|
+
"numpy>=1.24,<3",
|
|
31
|
+
"TypedUnit>=0.2.9",
|
|
32
|
+
"pint>=0.24,<0.26",
|
|
33
|
+
"matplotlib>=3.7,<4",
|
|
34
|
+
"plotly>=6,<7",
|
|
35
|
+
]
|
|
30
36
|
|
|
31
37
|
[project.optional-dependencies]
|
|
32
38
|
testing = ["pytest>=8,<10", "pytest-cov>=5,<8"]
|
|
33
39
|
test = ["BornSim[testing]"]
|
|
34
|
-
documentation = [
|
|
40
|
+
documentation = [
|
|
41
|
+
"MartinPdeS-docs>=0.1.4",
|
|
42
|
+
"sphinx>=7,<10",
|
|
43
|
+
"pydata-sphinx-theme>=0.16,<0.20",
|
|
44
|
+
"sphinx-gallery>=0.19,<1",
|
|
45
|
+
"sphinx-design>=0.6,<1",
|
|
46
|
+
]
|
|
35
47
|
dev = ["ruff>=0.11,<1", "mypy>=1.11,<2", "build>=1.2,<2", "twine>=6,<7", "pre-commit>=4,<5"]
|
|
36
48
|
|
|
37
49
|
[tool.setuptools.packages.find]
|
|
@@ -157,7 +157,14 @@ def create_release(tag: str, version: str) -> None:
|
|
|
157
157
|
"bornsim/_version.py",
|
|
158
158
|
)
|
|
159
159
|
|
|
160
|
-
run(
|
|
160
|
+
run(
|
|
161
|
+
"git",
|
|
162
|
+
"commit",
|
|
163
|
+
"-m",
|
|
164
|
+
f"Release {tag}",
|
|
165
|
+
"-m",
|
|
166
|
+
"Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>",
|
|
167
|
+
)
|
|
161
168
|
|
|
162
169
|
run("git", "tag", "-a", tag, "-m", f"Release {tag}")
|
|
163
170
|
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
__version__ = version = "0.5.0"
|
|
@@ -1,153 +0,0 @@
|
|
|
1
|
-
"""BornSim documentation configuration."""
|
|
2
|
-
|
|
3
|
-
from pathlib import Path
|
|
4
|
-
import os
|
|
5
|
-
import sys
|
|
6
|
-
|
|
7
|
-
sys.path.insert(0, str(Path(__file__).parent))
|
|
8
|
-
|
|
9
|
-
from bornsim import __version__
|
|
10
|
-
from bornsim.units import ureg
|
|
11
|
-
|
|
12
|
-
project = "BornSim"
|
|
13
|
-
|
|
14
|
-
author = "Martin Poinsinet de Sivry-Houle"
|
|
15
|
-
|
|
16
|
-
copyright = "2026, Martin Poinsinet de Sivry-Houle"
|
|
17
|
-
|
|
18
|
-
release = __version__
|
|
19
|
-
|
|
20
|
-
version = release
|
|
21
|
-
|
|
22
|
-
extensions = [
|
|
23
|
-
"sphinx.ext.autodoc",
|
|
24
|
-
"sphinx.ext.napoleon",
|
|
25
|
-
"sphinx.ext.mathjax",
|
|
26
|
-
"sphinx.ext.viewcode",
|
|
27
|
-
"sphinx_gallery.gen_gallery",
|
|
28
|
-
"sphinx_design",
|
|
29
|
-
]
|
|
30
|
-
|
|
31
|
-
html_theme = "pydata_sphinx_theme"
|
|
32
|
-
|
|
33
|
-
html_static_path = ["_static"]
|
|
34
|
-
|
|
35
|
-
html_logo = "_static/logo.png"
|
|
36
|
-
|
|
37
|
-
html_favicon = "_static/favicon.png"
|
|
38
|
-
|
|
39
|
-
html_theme_options = {
|
|
40
|
-
"logo": {"alt_text": "BornSim"},
|
|
41
|
-
"show_nav_level": 0,
|
|
42
|
-
"navbar_align": "left",
|
|
43
|
-
"navbar_end": ["version-switcher", "theme-switcher", "navbar-icon-links"],
|
|
44
|
-
"icon_links": [
|
|
45
|
-
{
|
|
46
|
-
"name": "GitHub",
|
|
47
|
-
"url": "https://github.com/MartinPdeS/BornSim",
|
|
48
|
-
"icon": "fa-brands fa-github",
|
|
49
|
-
},
|
|
50
|
-
],
|
|
51
|
-
"show_prev_next": False,
|
|
52
|
-
"show_version_warning_banner": True,
|
|
53
|
-
"footer_start": ["copyright"],
|
|
54
|
-
"footer_end": ["sphinx-version", "theme-version"],
|
|
55
|
-
"pygments_light_style": "default",
|
|
56
|
-
"pygments_dark_style": "github-dark",
|
|
57
|
-
"switcher": {
|
|
58
|
-
"json_url": "https://raw.githubusercontent.com/MartinPdeS/BornSim/documentation_page/version_switcher.json",
|
|
59
|
-
"version_match": os.getenv("tag", "latest"),
|
|
60
|
-
},
|
|
61
|
-
# The deployment regenerates this remote manifest after the build.
|
|
62
|
-
"check_switcher": False,
|
|
63
|
-
}
|
|
64
|
-
|
|
65
|
-
html_context = {
|
|
66
|
-
"github_url": "https://github.com",
|
|
67
|
-
"github_user": "MartinPdeS",
|
|
68
|
-
"github_repo": "BornSim",
|
|
69
|
-
"github_version": "master" if os.getenv("tag", "latest") == "latest" else os.environ["tag"],
|
|
70
|
-
"doc_path": "docs/source",
|
|
71
|
-
"default_mode": "dark",
|
|
72
|
-
}
|
|
73
|
-
|
|
74
|
-
exclude_patterns = []
|
|
75
|
-
|
|
76
|
-
autodoc_typehints = "description"
|
|
77
|
-
|
|
78
|
-
napoleon_google_docstring = False
|
|
79
|
-
|
|
80
|
-
napoleon_numpy_docstring = True
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
sphinx_gallery_conf = {
|
|
84
|
-
"examples_dirs": "../examples",
|
|
85
|
-
"gallery_dirs": "auto_examples",
|
|
86
|
-
"filename_pattern": r"\.py$",
|
|
87
|
-
"capture_repr": (),
|
|
88
|
-
"image_scrapers": ("matplotlib", "gallery_config.plotly_scraper"),
|
|
89
|
-
"abort_on_example_error": True,
|
|
90
|
-
"download_all_examples": False,
|
|
91
|
-
"backreferences_dir": None,
|
|
92
|
-
"reset_argv": "gallery_config.gallery_arguments",
|
|
93
|
-
"subsection_order": [
|
|
94
|
-
"../examples/random_media",
|
|
95
|
-
"../examples/structured_media",
|
|
96
|
-
"../examples/born_orders",
|
|
97
|
-
"../examples/results",
|
|
98
|
-
"../examples/validation",
|
|
99
|
-
],
|
|
100
|
-
}
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
def write_interactive_media(app, exception):
|
|
104
|
-
"""Export browser volume views for HTML documentation builds."""
|
|
105
|
-
|
|
106
|
-
if exception is not None or app.builder.format != "html":
|
|
107
|
-
return
|
|
108
|
-
|
|
109
|
-
from pathlib import Path
|
|
110
|
-
|
|
111
|
-
output = Path(app.outdir) / "_static"
|
|
112
|
-
|
|
113
|
-
output.mkdir(exist_ok=True)
|
|
114
|
-
|
|
115
|
-
from bornsim import Grid
|
|
116
|
-
from bornsim.medium.random_medium import GaussianMedium, ExponentialMedium
|
|
117
|
-
|
|
118
|
-
grid = Grid(
|
|
119
|
-
shape=(16, 16, 16),
|
|
120
|
-
spacing=2.5e-08 * ureg.meter,
|
|
121
|
-
)
|
|
122
|
-
|
|
123
|
-
for correlation, medium_type in (("gaussian", GaussianMedium), ("exponential", ExponentialMedium)):
|
|
124
|
-
medium = medium_type(
|
|
125
|
-
refractive_index_std=0.01,
|
|
126
|
-
correlation_length=7.5e-08 * ureg.meter,
|
|
127
|
-
background_refractive_index=1.33,
|
|
128
|
-
)
|
|
129
|
-
|
|
130
|
-
volume = medium.to_volume(
|
|
131
|
-
grid=grid,
|
|
132
|
-
seed=42,
|
|
133
|
-
)
|
|
134
|
-
|
|
135
|
-
figure = volume.plot_3d(
|
|
136
|
-
backend="plotly",
|
|
137
|
-
mode="volume",
|
|
138
|
-
field="refractive_index",
|
|
139
|
-
surface_count=16,
|
|
140
|
-
opacity=0.2,
|
|
141
|
-
opacity_scale="increasing",
|
|
142
|
-
)
|
|
143
|
-
|
|
144
|
-
figure.update_layout(title=f"{correlation.capitalize()} random medium · higher refractive index is more opaque")
|
|
145
|
-
|
|
146
|
-
figure.write_html(
|
|
147
|
-
file=str(output / f"random-medium-{correlation}.html"),
|
|
148
|
-
include_plotlyjs=True,
|
|
149
|
-
)
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
def setup(app):
|
|
153
|
-
app.connect("build-finished", write_interactive_media)
|
|
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
|
|
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
|
{bornsim-0.5.0 → bornsim-0.5.4}/docs/examples/structured_media/theory_directional_interference.py
RENAMED
|
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
|
|
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
|