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.
Files changed (31) hide show
  1. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/LICENSE +20 -20
  2. {vectorwaves-1.0.0/src/vectorwaves.egg-info → vectorwaves-1.0.1}/PKG-INFO +133 -114
  3. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/README.md +30 -2
  4. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/README_PyPi.md +69 -51
  5. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/pyproject.toml +107 -101
  6. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/setup.cfg +4 -4
  7. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/backends/cupy_backend.py +189 -197
  8. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/backends/numba_backend.py +287 -271
  9. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/backends/numpy_backend.py +199 -193
  10. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/beam_stuff.py +2 -2
  11. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/config_stuff.py +10 -5
  12. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/engine_stuff.py +1 -1
  13. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/singularities.py +288 -164
  14. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/spectra.py +342 -340
  15. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/utils.py +3 -1
  16. vectorwaves-1.0.1/src/vectorwaves/version.py +5 -0
  17. {vectorwaves-1.0.0 → vectorwaves-1.0.1/src/vectorwaves.egg-info}/PKG-INFO +133 -114
  18. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves.egg-info/SOURCES.txt +7 -1
  19. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves.egg-info/requires.txt +4 -0
  20. vectorwaves-1.0.1/tests/test_beam_stuff.py +255 -0
  21. vectorwaves-1.0.1/tests/test_config_stuff.py +350 -0
  22. vectorwaves-1.0.1/tests/test_engine_stuff.py +223 -0
  23. vectorwaves-1.0.1/tests/test_singularities.py +277 -0
  24. vectorwaves-1.0.1/tests/test_spectra.py +153 -0
  25. vectorwaves-1.0.1/tests/test_utils.py +108 -0
  26. vectorwaves-1.0.0/src/vectorwaves/version.py +0 -5
  27. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/__init__.py +0 -0
  28. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/backends/__init__.py +0 -0
  29. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves/py.typed +0 -0
  30. {vectorwaves-1.0.0 → vectorwaves-1.0.1}/src/vectorwaves.egg-info/dependency_links.txt +0 -0
  31. {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.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/1Rayokelvin/VectorWaves
28
- Project-URL: Repository, https://github.com/1Rayokelvin/VectorWaves
29
- Project-URL: Issues, https://github.com/1Rayokelvin/VectorWaves/issues
30
- Project-URL: Documentation, https://1rayokelvin.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: Development Status :: 4 - Beta
33
- Classifier: Intended Audience :: Science/Research
34
- Classifier: Intended Audience :: Education
35
- Classifier: License :: OSI Approved :: MIT License
36
- Classifier: Programming Language :: Python :: 3
37
- Classifier: Programming Language :: Python :: 3.10
38
- Classifier: Programming Language :: Python :: 3.11
39
- Classifier: Programming Language :: Python :: 3.12
40
- Classifier: Programming Language :: Python :: 3.13
41
- Classifier: Operating System :: OS Independent
42
- Classifier: Topic :: Scientific/Engineering :: Physics
43
- Classifier: Topic :: Scientific/Engineering
44
- Requires-Python: >=3.10
45
- Description-Content-Type: text/markdown
46
- License-File: LICENSE
47
- Requires-Dist: numpy>=1.24.0
48
- Requires-Dist: scipy>=1.10.0
49
- Requires-Dist: numba>=0.59.0
50
- Provides-Extra: viz
51
- Requires-Dist: matplotlib>=3.7.0; extra == "viz"
52
- Requires-Dist: pyvista>=0.40.0; extra == "viz"
53
- Provides-Extra: progress
54
- Requires-Dist: tqdm>=4.65.0; extra == "progress"
55
- Provides-Extra: gpu
56
- Requires-Dist: cupy-cuda12x>=12.0.0; extra == "gpu"
57
- Provides-Extra: all
58
- Requires-Dist: matplotlib>=3.7.0; extra == "all"
59
- Requires-Dist: pyvista>=0.40.0; extra == "all"
60
- Requires-Dist: tqdm>=4.65.0; extra == "all"
61
- Requires-Dist: cupy-cuda12x>=12.0.0; extra == "all"
62
- Dynamic: license-file
63
-
64
- VectorWaves provides a framework for generating, computing, and analyzing fully three-dimensional electromagnetic fields and their topology through discrete plane-wave expansions.
65
-
66
- ## Installation
67
-
68
- ```bash
69
- pip install vectorwaves
70
- ```
71
-
72
- For additional features, you can install the optional dependencies:
73
-
74
- | Extra | Purpose |
75
- |---------|---------|
76
- | `viz` | Matplotlib and PyVista for visualizations |
77
- | `progress` | Progress bars via tqdm |
78
- | `gpu` | CUDA acceleration via CuPy |
79
- | `all` | All the above |
80
-
81
- To install,
82
- ```bash
83
- pip install vectorwaves[extra]
84
- ```
85
-
86
- ## Features
87
-
88
- - Physics-oriented configuration system with `numpy`, `numba`, and CuPy (GPU) backends.
89
- - Exact non-paraxial 3D propagation via Fibonacci-sphere discrete plane-wave expansions.
90
- - Monochromatic and polychromatic sources with arbitrary envelopes, structured light support.
91
- - Stochastic process generation for speckle-like fields.
92
- - Fully analytic computation of E-fields, B-fields, spatial derivatives.
93
- - Topological polarization analysis: C, Cᵀ, and Lᵀ point finding with 3D line tracing.
94
-
95
- ## Quick Example
96
-
97
- ```python
98
- import vectorwaves as vw
99
-
100
- # Generate a tightly-focused Laguerre-Gaussian beam
101
- config = vw.get_config()
102
- config.source.k_space.laguerre_gauss(p=1, l=2, sigma_k_perp=1)
103
- config.source.randomize.off()
104
-
105
- # Construct the beam and visualize its plane-wave modes
106
- beam = vw.setup_beam(config)
107
-
108
- # Requires matplotlib, install with 'viz' extra: pip install vectorwaves[viz]
109
- beam.plot_kspace_3d(plot_type='colored_vectors')
110
- ```
111
-
112
- ![LG beam k-space](https://github.com/1Rayokelvin/VectorWaves/blob/main/docs/images/LG_kspace.png?raw=true)
113
-
114
- For tutorials and examples, please refer to the [official documentation](https://1rayokelvin.github.io/VectorWaves). Source code is available on [GitHub](https://github.com/1Rayokelvin/VectorWaves/).
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
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.21762335.svg)](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
+ ![LG beam k-space](https://github.com/M-Soni-Physics/VectorWaves/blob/main/docs/images/LG_kspace.png?raw=true)
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
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.21762335.svg)](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://1rayokelvin.github.io/VectorWaves).**
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://1rayokelvin.github.io/VectorWaves)**.
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 provides a framework for generating, computing, and analyzing fully three-dimensional electromagnetic fields and their topology through discrete plane-wave expansions.
2
-
3
- ## Installation
4
-
5
- ```bash
6
- pip install vectorwaves
7
- ```
8
-
9
- For additional features, you can install the optional dependencies:
10
-
11
- | Extra | Purpose |
12
- |---------|---------|
13
- | `viz` | Matplotlib and PyVista for visualizations |
14
- | `progress` | Progress bars via tqdm |
15
- | `gpu` | CUDA acceleration via CuPy |
16
- | `all` | All the above |
17
-
18
- To install,
19
- ```bash
20
- pip install vectorwaves[extra]
21
- ```
22
-
23
- ## Features
24
-
25
- - Physics-oriented configuration system with `numpy`, `numba`, and CuPy (GPU) backends.
26
- - Exact non-paraxial 3D propagation via Fibonacci-sphere discrete plane-wave expansions.
27
- - Monochromatic and polychromatic sources with arbitrary envelopes, structured light support.
28
- - Stochastic process generation for speckle-like fields.
29
- - Fully analytic computation of E-fields, B-fields, spatial derivatives.
30
- - Topological polarization analysis: C, Cᵀ, and Lᵀ point finding with 3D line tracing.
31
-
32
- ## Quick Example
33
-
34
- ```python
35
- import vectorwaves as vw
36
-
37
- # Generate a tightly-focused Laguerre-Gaussian beam
38
- config = vw.get_config()
39
- config.source.k_space.laguerre_gauss(p=1, l=2, sigma_k_perp=1)
40
- config.source.randomize.off()
41
-
42
- # Construct the beam and visualize its plane-wave modes
43
- beam = vw.setup_beam(config)
44
-
45
- # Requires matplotlib, install with 'viz' extra: pip install vectorwaves[viz]
46
- beam.plot_kspace_3d(plot_type='colored_vectors')
47
- ```
48
-
49
- ![LG beam k-space](https://github.com/1Rayokelvin/VectorWaves/blob/main/docs/images/LG_kspace.png?raw=true)
50
-
51
- For tutorials and examples, please refer to the [official documentation](https://1rayokelvin.github.io/VectorWaves). Source code is available on [GitHub](https://github.com/1Rayokelvin/VectorWaves/).
1
+ # VectorWaves
2
+
3
+ [![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.21762335.svg)](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
+ ![LG beam k-space](https://github.com/M-Soni-Physics/VectorWaves/blob/main/docs/images/LG_kspace.png?raw=true)
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
+ ```