vectorwaves 1.0.0__tar.gz → 1.0.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/LICENSE +20 -20
- {vectorwaves-1.0.0/src/vectorwaves.egg-info → vectorwaves-1.0.1}/PKG-INFO +133 -114
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/README.md +30 -2
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/README_PyPi.md +69 -51
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/pyproject.toml +107 -101
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/setup.cfg +4 -4
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/backends/cupy_backend.py +189 -197
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/backends/numba_backend.py +287 -271
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/backends/numpy_backend.py +199 -193
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/beam_stuff.py +2 -2
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/config_stuff.py +10 -5
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/engine_stuff.py +1 -1
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/singularities.py +288 -164
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/spectra.py +342 -340
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/utils.py +3 -1
- vectorwaves-1.0.1/src/vectorwaves/version.py +5 -0
- {vectorwaves-1.0.0 → vectorwaves-1.0.1/src/vectorwaves.egg-info}/PKG-INFO +133 -114
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves.egg-info/SOURCES.txt +7 -1
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves.egg-info/requires.txt +4 -0
- vectorwaves-1.0.1/tests/test_beam_stuff.py +255 -0
- vectorwaves-1.0.1/tests/test_config_stuff.py +350 -0
- vectorwaves-1.0.1/tests/test_engine_stuff.py +223 -0
- vectorwaves-1.0.1/tests/test_singularities.py +277 -0
- vectorwaves-1.0.1/tests/test_spectra.py +153 -0
- vectorwaves-1.0.1/tests/test_utils.py +108 -0
- vectorwaves-1.0.0/src/vectorwaves/version.py +0 -5
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/__init__.py +0 -0
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/backends/__init__.py +0 -0
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/py.typed +0 -0
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves.egg-info/dependency_links.txt +0 -0
- {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves.egg-info/top_level.txt +0 -0
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
MIT License
|
|
2
|
-
|
|
3
|
-
Copyright (c) 2026 Mayank Soni
|
|
4
|
-
|
|
5
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
-
in the Software without restriction, including without limitation the rights
|
|
8
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
-
furnished to do so, subject to the following conditions:
|
|
11
|
-
|
|
12
|
-
The above copyright notice and this permission notice shall be included in all
|
|
13
|
-
copies or substantial portions of the Software.
|
|
14
|
-
|
|
15
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Mayank Soni
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
21
|
SOFTWARE.
|
|
@@ -1,114 +1,133 @@
|
|
|
1
|
-
Metadata-Version: 2.4
|
|
2
|
-
Name: vectorwaves
|
|
3
|
-
Version: 1.0.
|
|
4
|
-
Summary: Three-dimensional electromagnetic field simulation and topology analysis
|
|
5
|
-
Author: Mayank Soni
|
|
6
|
-
License: MIT License
|
|
7
|
-
|
|
8
|
-
Copyright (c) 2026 Mayank Soni
|
|
9
|
-
|
|
10
|
-
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
-
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
-
in the Software without restriction, including without limitation the rights
|
|
13
|
-
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
-
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
-
furnished to do so, subject to the following conditions:
|
|
16
|
-
|
|
17
|
-
The above copyright notice and this permission notice shall be included in all
|
|
18
|
-
copies or substantial portions of the Software.
|
|
19
|
-
|
|
20
|
-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
-
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
-
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
-
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
-
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
-
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
-
SOFTWARE.
|
|
27
|
-
Project-URL: Homepage, https://github.com/
|
|
28
|
-
Project-URL: Repository, https://github.com/
|
|
29
|
-
Project-URL: Issues, https://github.com/
|
|
30
|
-
Project-URL: Documentation, https://
|
|
31
|
-
Keywords: physics,optics,wave-optics,vector-optics,electromagnetism,electromagnetic-fields,structured-light,gaussian-beams,laguerre-gaussian,plane-wave-expansion,computational-physics,optical-singularities,polarization-singularities,phase-singularities,topological-optics,optical-vortices
|
|
32
|
-
Classifier:
|
|
33
|
-
Classifier: Intended Audience ::
|
|
34
|
-
Classifier:
|
|
35
|
-
Classifier:
|
|
36
|
-
Classifier: Programming Language :: Python :: 3
|
|
37
|
-
Classifier: Programming Language :: Python :: 3.
|
|
38
|
-
Classifier: Programming Language :: Python :: 3.
|
|
39
|
-
Classifier:
|
|
40
|
-
Classifier:
|
|
41
|
-
Classifier:
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
Requires-Dist:
|
|
48
|
-
|
|
49
|
-
Requires-Dist:
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
Requires-Dist:
|
|
53
|
-
Provides-Extra:
|
|
54
|
-
Requires-Dist:
|
|
55
|
-
Provides-Extra:
|
|
56
|
-
Requires-Dist:
|
|
57
|
-
|
|
58
|
-
Requires-Dist:
|
|
59
|
-
Requires-Dist:
|
|
60
|
-
|
|
61
|
-
Requires-Dist:
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
#
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: vectorwaves
|
|
3
|
+
Version: 1.0.1
|
|
4
|
+
Summary: Three-dimensional electromagnetic field simulation and topology analysis
|
|
5
|
+
Author: Mayank Soni
|
|
6
|
+
License: MIT License
|
|
7
|
+
|
|
8
|
+
Copyright (c) 2026 Mayank Soni
|
|
9
|
+
|
|
10
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
11
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
12
|
+
in the Software without restriction, including without limitation the rights
|
|
13
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
14
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
15
|
+
furnished to do so, subject to the following conditions:
|
|
16
|
+
|
|
17
|
+
The above copyright notice and this permission notice shall be included in all
|
|
18
|
+
copies or substantial portions of the Software.
|
|
19
|
+
|
|
20
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
21
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
22
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
23
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
24
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
25
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
26
|
+
SOFTWARE.
|
|
27
|
+
Project-URL: Homepage, https://github.com/M-Soni-Physics/VectorWaves
|
|
28
|
+
Project-URL: Repository, https://github.com/M-Soni-Physics/VectorWaves
|
|
29
|
+
Project-URL: Issues, https://github.com/M-Soni-Physics/VectorWaves/issues
|
|
30
|
+
Project-URL: Documentation, https://M-Soni-Physics.github.io/VectorWaves
|
|
31
|
+
Keywords: physics,optics,wave-optics,vector-optics,electromagnetism,electromagnetic-fields,structured-light,gaussian-beams,laguerre-gaussian,plane-wave-expansion,computational-physics,optical-singularities,polarization-singularities,phase-singularities,topological-optics,optical-vortices
|
|
32
|
+
Classifier: Intended Audience :: Science/Research
|
|
33
|
+
Classifier: Intended Audience :: Education
|
|
34
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
35
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
36
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
37
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
38
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
39
|
+
Classifier: Operating System :: OS Independent
|
|
40
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
41
|
+
Classifier: Topic :: Scientific/Engineering
|
|
42
|
+
Requires-Python: >=3.10
|
|
43
|
+
Description-Content-Type: text/markdown
|
|
44
|
+
License-File: LICENSE
|
|
45
|
+
Requires-Dist: numpy>=1.24.0
|
|
46
|
+
Requires-Dist: scipy>=1.10.0
|
|
47
|
+
Requires-Dist: numba>=0.59.0
|
|
48
|
+
Provides-Extra: viz
|
|
49
|
+
Requires-Dist: matplotlib>=3.7.0; extra == "viz"
|
|
50
|
+
Requires-Dist: pyvista>=0.40.0; extra == "viz"
|
|
51
|
+
Provides-Extra: progress
|
|
52
|
+
Requires-Dist: tqdm>=4.65.0; extra == "progress"
|
|
53
|
+
Provides-Extra: gpu
|
|
54
|
+
Requires-Dist: cupy-cuda12x>=12.0.0; extra == "gpu"
|
|
55
|
+
Provides-Extra: all
|
|
56
|
+
Requires-Dist: matplotlib>=3.7.0; extra == "all"
|
|
57
|
+
Requires-Dist: pyvista>=0.40.0; extra == "all"
|
|
58
|
+
Requires-Dist: tqdm>=4.65.0; extra == "all"
|
|
59
|
+
Requires-Dist: cupy-cuda12x>=12.0.0; extra == "all"
|
|
60
|
+
Provides-Extra: test
|
|
61
|
+
Requires-Dist: pytest>=7.4.0; extra == "test"
|
|
62
|
+
Requires-Dist: pytest-cov>=4.1.0; extra == "test"
|
|
63
|
+
Dynamic: license-file
|
|
64
|
+
|
|
65
|
+
# VectorWaves
|
|
66
|
+
|
|
67
|
+
[](https://doi.org/10.5281/zenodo.21762335)
|
|
68
|
+
|
|
69
|
+
VectorWaves provides a framework for generating, computing, and analyzing fully three-dimensional electromagnetic fields and their topology through discrete plane-wave expansions.
|
|
70
|
+
|
|
71
|
+
## Installation
|
|
72
|
+
|
|
73
|
+
```bash
|
|
74
|
+
pip install vectorwaves
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
For additional features, you can install the optional dependencies:
|
|
78
|
+
|
|
79
|
+
| Extra | Purpose |
|
|
80
|
+
|---------|---------|
|
|
81
|
+
| `viz` | Matplotlib and PyVista for visualizations |
|
|
82
|
+
| `progress` | Progress bars via tqdm |
|
|
83
|
+
| `gpu` | CUDA acceleration via CuPy |
|
|
84
|
+
| `all` | All the above |
|
|
85
|
+
|
|
86
|
+
To install,
|
|
87
|
+
```bash
|
|
88
|
+
pip install vectorwaves[extra]
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
## Features
|
|
92
|
+
|
|
93
|
+
- Physics-oriented configuration system with `numpy`, `numba`, and CuPy (GPU) backends.
|
|
94
|
+
- Exact non-paraxial 3D propagation via Fibonacci-sphere discrete plane-wave expansions.
|
|
95
|
+
- Monochromatic and polychromatic sources with arbitrary envelopes, structured light support.
|
|
96
|
+
- Stochastic process generation for speckle-like fields.
|
|
97
|
+
- Fully analytic computation of E-fields, B-fields, spatial derivatives.
|
|
98
|
+
- Topological polarization analysis: C, Cᵀ, and Lᵀ point finding with 3D line tracing.
|
|
99
|
+
|
|
100
|
+
## Quick Example
|
|
101
|
+
|
|
102
|
+
```python
|
|
103
|
+
import vectorwaves as vw
|
|
104
|
+
|
|
105
|
+
# Generate a tightly-focused Laguerre-Gaussian beam
|
|
106
|
+
config = vw.get_config()
|
|
107
|
+
config.source.k_space.laguerre_gauss(p=1, l=2, sigma_k_perp=1)
|
|
108
|
+
config.source.randomize.off()
|
|
109
|
+
|
|
110
|
+
# Construct the beam and visualize its plane-wave modes
|
|
111
|
+
beam = vw.setup_beam(config)
|
|
112
|
+
|
|
113
|
+
# Requires matplotlib, included with 'viz' extra
|
|
114
|
+
beam.plot_kspace_3d(plot_type='matplotlib_scatter')
|
|
115
|
+
```
|
|
116
|
+
|
|
117
|
+

|
|
118
|
+
|
|
119
|
+
For tutorials and examples, please refer to the [official documentation](https://M-Soni-Physics.github.io/VectorWaves). Source code is available on [GitHub](https://github.com/M-Soni-Physics/VectorWaves/).
|
|
120
|
+
|
|
121
|
+
## Citing
|
|
122
|
+
|
|
123
|
+
If you use VectorWaves in your research, please cite it:
|
|
124
|
+
|
|
125
|
+
```bibtex
|
|
126
|
+
@software{soni_vectorwaves,
|
|
127
|
+
author = {Soni, Mayank},
|
|
128
|
+
title = {VectorWaves},
|
|
129
|
+
year = {2026},
|
|
130
|
+
doi = {10.5281/zenodo.21762335},
|
|
131
|
+
url = {https://github.com/M-Soni-Physics/VectorWaves}
|
|
132
|
+
}
|
|
133
|
+
```
|
|
@@ -1,10 +1,12 @@
|
|
|
1
1
|
# VectorWaves
|
|
2
2
|
|
|
3
|
+
[](https://doi.org/10.5281/zenodo.21762335)
|
|
4
|
+
|
|
3
5
|
A Python library for constructing and analyzing electromagnetic fields through discrete plane-wave expansions.
|
|
4
6
|
|
|
5
7
|
Classical light is fundamentally an electromagnetic wave. In vacuum, electromagnetic fields admit a plane-wave decomposition, and VectorWaves provides a framework for constructing, computing, and analyzing fully three-dimensional vector fields and their topological structures.
|
|
6
8
|
|
|
7
|
-
**For full documentation, basic usage, and tutorials, visit the [official documentation site](https://
|
|
9
|
+
**For full documentation, basic usage, and tutorials, visit the [official documentation site](https://M-Soni-Physics.github.io/VectorWaves).**
|
|
8
10
|
|
|
9
11
|
## Installation
|
|
10
12
|
|
|
@@ -26,6 +28,11 @@ To install,
|
|
|
26
28
|
pip install vectorwaves[#Extra]
|
|
27
29
|
```
|
|
28
30
|
|
|
31
|
+
#### GPU Support Note:
|
|
32
|
+
The default `pip install vectorwaves[gpu]` targets CUDA 12.
|
|
33
|
+
- If your machine runs CUDA 11.x, install `pip install cupy-cuda11x` instead.
|
|
34
|
+
- If you experience driver initialization issues, ensure your NVIDIA driver supports the CUDA version installed. VectorWaves only requires the CUDA runtime compiler (NVRTC) and Driver API.
|
|
35
|
+
|
|
29
36
|
## Features
|
|
30
37
|
|
|
31
38
|
- **Exact 3D Fields**: Electric, Magnetic fields and spatial derivatives via Fibonacci-sphere discrete plane-wave expansions.
|
|
@@ -80,4 +87,25 @@ plt.show()
|
|
|
80
87
|
*(Note the colorbar scales: the solver automatically calculates the correct relative magnitudes of the emergent longitudinal components without any paraxial approximations).*
|
|
81
88
|
|
|
82
89
|
### Ready to learn more?
|
|
83
|
-
For a gentler introduction covering basic configurations, spectral envelopes, or fully 3D field visualizations, head over to the **[Getting Started Guide](https://
|
|
90
|
+
For a gentler introduction covering basic configurations, spectral envelopes, or fully 3D field visualizations, head over to the **[Getting Started Guide](https://M-Soni-Physics.github.io/VectorWaves)**.
|
|
91
|
+
|
|
92
|
+
|
|
93
|
+
## Contributing
|
|
94
|
+
|
|
95
|
+
Contributions, bug reports, and feature requests are welcome! If you want to contribute or set up VectorWaves locally for testing, please see the [Contributing Guide](CONTRIBUTING.md).
|
|
96
|
+
|
|
97
|
+
## Citing
|
|
98
|
+
|
|
99
|
+
If you use VectorWaves in your research, please cite it:
|
|
100
|
+
|
|
101
|
+
```bibtex
|
|
102
|
+
@software{soni_vectorwaves,
|
|
103
|
+
author = {Soni, Mayank},
|
|
104
|
+
title = {VectorWaves},
|
|
105
|
+
year = {2026},
|
|
106
|
+
doi = {10.5281/zenodo.21762335},
|
|
107
|
+
url = {https://github.com/M-Soni-Physics/VectorWaves}
|
|
108
|
+
}
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
GitHub's "Cite this repository" button also reads `CITATION.cff`.
|
|
@@ -1,51 +1,69 @@
|
|
|
1
|
-
VectorWaves
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
-
|
|
30
|
-
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
beam
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
1
|
+
# VectorWaves
|
|
2
|
+
|
|
3
|
+
[](https://doi.org/10.5281/zenodo.21762335)
|
|
4
|
+
|
|
5
|
+
VectorWaves provides a framework for generating, computing, and analyzing fully three-dimensional electromagnetic fields and their topology through discrete plane-wave expansions.
|
|
6
|
+
|
|
7
|
+
## Installation
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install vectorwaves
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
For additional features, you can install the optional dependencies:
|
|
14
|
+
|
|
15
|
+
| Extra | Purpose |
|
|
16
|
+
|---------|---------|
|
|
17
|
+
| `viz` | Matplotlib and PyVista for visualizations |
|
|
18
|
+
| `progress` | Progress bars via tqdm |
|
|
19
|
+
| `gpu` | CUDA acceleration via CuPy |
|
|
20
|
+
| `all` | All the above |
|
|
21
|
+
|
|
22
|
+
To install,
|
|
23
|
+
```bash
|
|
24
|
+
pip install vectorwaves[extra]
|
|
25
|
+
```
|
|
26
|
+
|
|
27
|
+
## Features
|
|
28
|
+
|
|
29
|
+
- Physics-oriented configuration system with `numpy`, `numba`, and CuPy (GPU) backends.
|
|
30
|
+
- Exact non-paraxial 3D propagation via Fibonacci-sphere discrete plane-wave expansions.
|
|
31
|
+
- Monochromatic and polychromatic sources with arbitrary envelopes, structured light support.
|
|
32
|
+
- Stochastic process generation for speckle-like fields.
|
|
33
|
+
- Fully analytic computation of E-fields, B-fields, spatial derivatives.
|
|
34
|
+
- Topological polarization analysis: C, Cᵀ, and Lᵀ point finding with 3D line tracing.
|
|
35
|
+
|
|
36
|
+
## Quick Example
|
|
37
|
+
|
|
38
|
+
```python
|
|
39
|
+
import vectorwaves as vw
|
|
40
|
+
|
|
41
|
+
# Generate a tightly-focused Laguerre-Gaussian beam
|
|
42
|
+
config = vw.get_config()
|
|
43
|
+
config.source.k_space.laguerre_gauss(p=1, l=2, sigma_k_perp=1)
|
|
44
|
+
config.source.randomize.off()
|
|
45
|
+
|
|
46
|
+
# Construct the beam and visualize its plane-wave modes
|
|
47
|
+
beam = vw.setup_beam(config)
|
|
48
|
+
|
|
49
|
+
# Requires matplotlib, included with 'viz' extra
|
|
50
|
+
beam.plot_kspace_3d(plot_type='matplotlib_scatter')
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+

|
|
54
|
+
|
|
55
|
+
For tutorials and examples, please refer to the [official documentation](https://M-Soni-Physics.github.io/VectorWaves). Source code is available on [GitHub](https://github.com/M-Soni-Physics/VectorWaves/).
|
|
56
|
+
|
|
57
|
+
## Citing
|
|
58
|
+
|
|
59
|
+
If you use VectorWaves in your research, please cite it:
|
|
60
|
+
|
|
61
|
+
```bibtex
|
|
62
|
+
@software{soni_vectorwaves,
|
|
63
|
+
author = {Soni, Mayank},
|
|
64
|
+
title = {VectorWaves},
|
|
65
|
+
year = {2026},
|
|
66
|
+
doi = {10.5281/zenodo.21762335},
|
|
67
|
+
url = {https://github.com/M-Soni-Physics/VectorWaves}
|
|
68
|
+
}
|
|
69
|
+
```
|