phased-array-modeling 1.0.0__py3-none-any.whl
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.
- phased_array/__init__.py +263 -0
- phased_array/beamforming.py +705 -0
- phased_array/core.py +598 -0
- phased_array/geometry.py +943 -0
- phased_array/impairments.py +719 -0
- phased_array/utils.py +346 -0
- phased_array/visualization.py +824 -0
- phased_array_modeling-1.0.0.dist-info/METADATA +259 -0
- phased_array_modeling-1.0.0.dist-info/RECORD +12 -0
- phased_array_modeling-1.0.0.dist-info/WHEEL +5 -0
- phased_array_modeling-1.0.0.dist-info/licenses/LICENSE +21 -0
- phased_array_modeling-1.0.0.dist-info/top_level.txt +1 -0
|
@@ -0,0 +1,259 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: phased-array-modeling
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Comprehensive Python library for phased array antenna modeling and visualization
|
|
5
|
+
Author-email: John Hodge <jah70@vt.edu>
|
|
6
|
+
License: MIT
|
|
7
|
+
Project-URL: Homepage, https://github.com/jman4162/Phased-Array-Antenna-Model
|
|
8
|
+
Project-URL: Repository, https://github.com/jman4162/Phased-Array-Antenna-Model
|
|
9
|
+
Project-URL: Issues, https://github.com/jman4162/Phased-Array-Antenna-Model/issues
|
|
10
|
+
Keywords: phased array,antenna,beamforming,radar,electromagnetics,array factor,radiation pattern
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Science/Research
|
|
13
|
+
Classifier: Intended Audience :: Education
|
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
15
|
+
Classifier: Operating System :: OS Independent
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering
|
|
23
|
+
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
24
|
+
Requires-Python: >=3.8
|
|
25
|
+
Description-Content-Type: text/markdown
|
|
26
|
+
License-File: LICENSE
|
|
27
|
+
Requires-Dist: numpy>=1.20.0
|
|
28
|
+
Requires-Dist: matplotlib>=3.5.0
|
|
29
|
+
Requires-Dist: scipy>=1.7.0
|
|
30
|
+
Provides-Extra: plotting
|
|
31
|
+
Requires-Dist: plotly>=5.0.0; extra == "plotting"
|
|
32
|
+
Provides-Extra: full
|
|
33
|
+
Requires-Dist: plotly>=5.0.0; extra == "full"
|
|
34
|
+
Requires-Dist: seaborn>=0.11.0; extra == "full"
|
|
35
|
+
Provides-Extra: dev
|
|
36
|
+
Requires-Dist: pytest>=7.0.0; extra == "dev"
|
|
37
|
+
Requires-Dist: pytest-cov>=4.0.0; extra == "dev"
|
|
38
|
+
Requires-Dist: plotly>=5.0.0; extra == "dev"
|
|
39
|
+
Requires-Dist: seaborn>=0.11.0; extra == "dev"
|
|
40
|
+
Dynamic: license-file
|
|
41
|
+
|
|
42
|
+
# Phased Array Antenna Modeling
|
|
43
|
+
|
|
44
|
+
[](https://github.com/jman4162/Phased-Array-Antenna-Model/actions/workflows/ci.yml)
|
|
45
|
+
[](https://www.python.org/downloads/)
|
|
46
|
+
[](https://opensource.org/licenses/MIT)
|
|
47
|
+
[](https://colab.research.google.com/github/jman4162/Phased-Array-Antenna-Model/blob/main/Phased_Array_Demo.ipynb)
|
|
48
|
+
|
|
49
|
+
A comprehensive Python library for computing and visualizing phased array antenna radiation patterns. Features **125x faster** vectorized computations, multiple array geometries, advanced beamforming, and interactive 3D visualization.
|
|
50
|
+
|
|
51
|
+
## Features
|
|
52
|
+
|
|
53
|
+
- **High Performance**: Vectorized array factor computation (125x faster than naive loops)
|
|
54
|
+
- **Multiple Geometries**: Rectangular, triangular, circular, cylindrical, spherical, sparse/thinned arrays
|
|
55
|
+
- **Beamforming**: Amplitude tapering (Taylor, Chebyshev, etc.), null steering, multi-beam
|
|
56
|
+
- **Realistic Impairments**: Mutual coupling, phase quantization, element failures, scan blindness
|
|
57
|
+
- **Visualization**: 2D matplotlib, interactive 3D Plotly, UV-space representation
|
|
58
|
+
- **Subarray Support**: Subarray-level beamforming with quantized phase shifters
|
|
59
|
+
|
|
60
|
+
## Installation
|
|
61
|
+
|
|
62
|
+
### From GitHub (recommended)
|
|
63
|
+
|
|
64
|
+
```bash
|
|
65
|
+
pip install git+https://github.com/jman4162/Phased-Array-Antenna-Model.git
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
### With optional dependencies
|
|
69
|
+
|
|
70
|
+
```bash
|
|
71
|
+
# Include Plotly for 3D visualization
|
|
72
|
+
pip install "phased-array[plotting] @ git+https://github.com/jman4162/Phased-Array-Antenna-Model.git"
|
|
73
|
+
|
|
74
|
+
# Include all optional dependencies
|
|
75
|
+
pip install "phased-array[full] @ git+https://github.com/jman4162/Phased-Array-Antenna-Model.git"
|
|
76
|
+
```
|
|
77
|
+
|
|
78
|
+
### For development
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
git clone https://github.com/jman4162/Phased-Array-Antenna-Model.git
|
|
82
|
+
cd Phased-Array-Antenna-Model
|
|
83
|
+
pip install -e ".[dev]"
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
## Quick Start
|
|
87
|
+
|
|
88
|
+
```python
|
|
89
|
+
import phased_array as pa
|
|
90
|
+
import numpy as np
|
|
91
|
+
|
|
92
|
+
# Create a 16x16 rectangular array with half-wavelength spacing
|
|
93
|
+
geom = pa.create_rectangular_array(16, 16, dx=0.5, dy=0.5)
|
|
94
|
+
|
|
95
|
+
# Wavenumber for normalized wavelength
|
|
96
|
+
k = pa.wavelength_to_k(1.0)
|
|
97
|
+
|
|
98
|
+
# Steering weights for 30 degree scan with Taylor taper
|
|
99
|
+
weights = pa.steering_vector(k, geom.x, geom.y, theta0_deg=30, phi0_deg=0)
|
|
100
|
+
weights *= pa.taylor_taper_2d(16, 16, sidelobe_dB=-30)
|
|
101
|
+
|
|
102
|
+
# Compute full 2D pattern
|
|
103
|
+
theta, phi, pattern_dB = pa.compute_full_pattern(geom.x, geom.y, weights, k)
|
|
104
|
+
|
|
105
|
+
# Plot
|
|
106
|
+
pa.plot_pattern_contour(np.rad2deg(theta), np.rad2deg(phi), pattern_dB,
|
|
107
|
+
title="16x16 Array - 30deg Scan with Taylor Taper")
|
|
108
|
+
```
|
|
109
|
+
|
|
110
|
+
## Examples
|
|
111
|
+
|
|
112
|
+
### Beam Steering
|
|
113
|
+
|
|
114
|
+
```python
|
|
115
|
+
# Steer beam to theta=25 deg, phi=45 deg
|
|
116
|
+
weights = pa.steering_vector(k, geom.x, geom.y, theta0_deg=25, phi0_deg=45)
|
|
117
|
+
|
|
118
|
+
# Compute E-plane and H-plane cuts
|
|
119
|
+
angles, E_plane, H_plane = pa.compute_pattern_cuts(
|
|
120
|
+
geom.x, geom.y, weights, k,
|
|
121
|
+
theta0_deg=25, phi0_deg=45
|
|
122
|
+
)
|
|
123
|
+
```
|
|
124
|
+
|
|
125
|
+
### Null Steering
|
|
126
|
+
|
|
127
|
+
```python
|
|
128
|
+
# Place nulls at specific directions to reject interference
|
|
129
|
+
null_directions = [(20, 0), (-20, 0)] # (theta, phi) in degrees
|
|
130
|
+
|
|
131
|
+
weights = pa.null_steering_projection(
|
|
132
|
+
geom, k,
|
|
133
|
+
theta_main_deg=0, phi_main_deg=0,
|
|
134
|
+
null_directions=null_directions
|
|
135
|
+
)
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Multiple Simultaneous Beams
|
|
139
|
+
|
|
140
|
+
```python
|
|
141
|
+
# Create 3 simultaneous beams
|
|
142
|
+
beam_directions = [(0, 0), (25, 0), (25, 180)]
|
|
143
|
+
|
|
144
|
+
weights = pa.multi_beam_weights_superposition(
|
|
145
|
+
geom, k, beam_directions,
|
|
146
|
+
amplitudes=[1.0, 0.7, 0.7]
|
|
147
|
+
)
|
|
148
|
+
```
|
|
149
|
+
|
|
150
|
+
### Circular/Conformal Arrays
|
|
151
|
+
|
|
152
|
+
```python
|
|
153
|
+
# Cylindrical array
|
|
154
|
+
geom_cyl = pa.create_cylindrical_array(
|
|
155
|
+
n_azimuth=16, n_vertical=8,
|
|
156
|
+
radius=2.0, height=4.0
|
|
157
|
+
)
|
|
158
|
+
|
|
159
|
+
# Compute pattern accounting for element orientations
|
|
160
|
+
AF = pa.array_factor_conformal(theta, phi, geom_cyl, weights, k)
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
### Phase Quantization Analysis
|
|
164
|
+
|
|
165
|
+
```python
|
|
166
|
+
# Simulate 4-bit phase shifters
|
|
167
|
+
weights_quantized = pa.quantize_phase(weights, n_bits=4)
|
|
168
|
+
|
|
169
|
+
# Analyze effect on pattern
|
|
170
|
+
results = pa.analyze_quantization_effect(weights, geom, k, n_bits=4)
|
|
171
|
+
print(f"RMS phase error: {results['rms_error_deg']:.1f} degrees")
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### 3D Interactive Visualization
|
|
175
|
+
|
|
176
|
+
```python
|
|
177
|
+
# Create interactive 3D pattern plot
|
|
178
|
+
fig = pa.plot_pattern_3d_plotly(theta, phi, pattern_dB,
|
|
179
|
+
title="3D Radiation Pattern")
|
|
180
|
+
fig.show()
|
|
181
|
+
```
|
|
182
|
+
|
|
183
|
+
## Documentation
|
|
184
|
+
|
|
185
|
+
For comprehensive documentation, see the [demo notebook](Phased_Array_Demo.ipynb) which covers:
|
|
186
|
+
|
|
187
|
+
1. Basic array factor computation
|
|
188
|
+
2. Beam steering
|
|
189
|
+
3. Performance benchmarking
|
|
190
|
+
4. Amplitude tapering comparison
|
|
191
|
+
5. Array geometries (rectangular, triangular, circular, etc.)
|
|
192
|
+
6. Null steering
|
|
193
|
+
7. Multiple simultaneous beams
|
|
194
|
+
8. Phase quantization effects
|
|
195
|
+
9. Element failure analysis
|
|
196
|
+
10. UV-space visualization
|
|
197
|
+
11. 3D Plotly visualization
|
|
198
|
+
12. Conformal array patterns
|
|
199
|
+
13. Mutual coupling effects
|
|
200
|
+
14. Subarray beamforming
|
|
201
|
+
|
|
202
|
+
## Package Structure
|
|
203
|
+
|
|
204
|
+
```
|
|
205
|
+
phased_array/
|
|
206
|
+
├── core.py # Vectorized AF, FFT, steering, element patterns
|
|
207
|
+
├── geometry.py # Array geometries and subarray architectures
|
|
208
|
+
├── beamforming.py # Tapering, null steering, multi-beam
|
|
209
|
+
├── impairments.py # Coupling, quantization, failures, scan blindness
|
|
210
|
+
├── visualization.py # 2D, 3D Plotly, UV-space plotting
|
|
211
|
+
└── utils.py # Coordinate transforms, helpers
|
|
212
|
+
```
|
|
213
|
+
|
|
214
|
+
## Requirements
|
|
215
|
+
|
|
216
|
+
- Python 3.8+
|
|
217
|
+
- NumPy >= 1.20.0
|
|
218
|
+
- Matplotlib >= 3.5.0
|
|
219
|
+
- SciPy >= 1.7.0
|
|
220
|
+
- Plotly >= 5.0.0 (optional, for 3D visualization)
|
|
221
|
+
|
|
222
|
+
## Running Tests
|
|
223
|
+
|
|
224
|
+
```bash
|
|
225
|
+
pytest tests/ -v
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
## Contributing
|
|
229
|
+
|
|
230
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
231
|
+
|
|
232
|
+
1. Fork the repository
|
|
233
|
+
2. Create your feature branch (`git checkout -b feature/AmazingFeature`)
|
|
234
|
+
3. Commit your changes (`git commit -m 'Add some AmazingFeature'`)
|
|
235
|
+
4. Push to the branch (`git push origin feature/AmazingFeature`)
|
|
236
|
+
5. Open a Pull Request
|
|
237
|
+
|
|
238
|
+
## License
|
|
239
|
+
|
|
240
|
+
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
|
|
241
|
+
|
|
242
|
+
## Citation
|
|
243
|
+
|
|
244
|
+
If you use this library in your research, please cite:
|
|
245
|
+
|
|
246
|
+
```bibtex
|
|
247
|
+
@software{phased_array,
|
|
248
|
+
author = {Hodge, John},
|
|
249
|
+
title = {Phased Array Antenna Modeling},
|
|
250
|
+
url = {https://github.com/jman4162/Phased-Array-Antenna-Model},
|
|
251
|
+
year = {2024}
|
|
252
|
+
}
|
|
253
|
+
```
|
|
254
|
+
|
|
255
|
+
## Contact
|
|
256
|
+
|
|
257
|
+
John Hodge - jah70@vt.edu
|
|
258
|
+
|
|
259
|
+
Project Link: [https://github.com/jman4162/Phased-Array-Antenna-Model](https://github.com/jman4162/Phased-Array-Antenna-Model)
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
phased_array/__init__.py,sha256=vowy0ImvkyyD2Lyb2Q0PbVCoQFr5TxEmWRCLxtojGws,6963
|
|
2
|
+
phased_array/beamforming.py,sha256=tBS2WG6-Xyw5dWNfJVH5MLmpMytPI3UAG0mr7O6w8ds,18608
|
|
3
|
+
phased_array/core.py,sha256=eVCjLtjVQuu4rGUOgYDYEPmFCMP1hA5RzvO8nPYYzmM,15925
|
|
4
|
+
phased_array/geometry.py,sha256=7JCTzaskQunDbp9o-JPlmeH_EROHXvhdqwwuQh2gyRc,26606
|
|
5
|
+
phased_array/impairments.py,sha256=D9Rrep1PnZ6fPWT97Fplk19mDHY1Ri-J6ew0wHidLmU,19907
|
|
6
|
+
phased_array/utils.py,sha256=s_4wIgN_uNtnrMwYXFjAq1Ixm-UjG0CarhTBDDeyON0,8307
|
|
7
|
+
phased_array/visualization.py,sha256=Srpq58t_p60HHqYfYdcTWZxi4XD6XUmtJO8AXPLzPSE,21516
|
|
8
|
+
phased_array_modeling-1.0.0.dist-info/licenses/LICENSE,sha256=nQNhHz5Oe0ni5umxM7kGSOU487wh9j4sxMkoIq0EdpE,1067
|
|
9
|
+
phased_array_modeling-1.0.0.dist-info/METADATA,sha256=WGf5WmtqALyUr49UD7HkM9Dat9pqhS3t8eLQJupr6XE,8218
|
|
10
|
+
phased_array_modeling-1.0.0.dist-info/WHEEL,sha256=wUyA8OaulRlbfwMtmQsvNngGrxQHAvkKcvRmdizlJi0,92
|
|
11
|
+
phased_array_modeling-1.0.0.dist-info/top_level.txt,sha256=rt-QKWmOYuHWZTv90R_XuLXmp5mnJ39ftBzyAvYimjI,13
|
|
12
|
+
phased_array_modeling-1.0.0.dist-info/RECORD,,
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 John Hodge
|
|
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
|
+
SOFTWARE.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
phased_array
|