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
phased_array/__init__.py
ADDED
|
@@ -0,0 +1,263 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Phased Array Antenna Modeling Package
|
|
3
|
+
|
|
4
|
+
A comprehensive Python library for computing and visualizing phased array
|
|
5
|
+
antenna radiation patterns, including:
|
|
6
|
+
|
|
7
|
+
- Vectorized array factor computation (50-100x faster than loops)
|
|
8
|
+
- FFT-based pattern computation for uniform rectangular arrays
|
|
9
|
+
- Various array geometries (rectangular, circular, conformal, sparse)
|
|
10
|
+
- Beamforming techniques (tapering, null steering, multi-beam)
|
|
11
|
+
- Realistic impairments (mutual coupling, quantization, failures, scan blindness)
|
|
12
|
+
- Interactive 3D visualization with Plotly
|
|
13
|
+
- UV-space pattern representation
|
|
14
|
+
|
|
15
|
+
Example
|
|
16
|
+
-------
|
|
17
|
+
>>> import phased_array as pa
|
|
18
|
+
>>> import numpy as np
|
|
19
|
+
>>>
|
|
20
|
+
>>> # Create a 10x10 rectangular array, half-wavelength spacing
|
|
21
|
+
>>> geom = pa.create_rectangular_array(10, 10, dx=0.5, dy=0.5)
|
|
22
|
+
>>>
|
|
23
|
+
>>> # Compute steering weights for 30 deg scan
|
|
24
|
+
>>> k = pa.wavelength_to_k(1.0) # normalized wavelength
|
|
25
|
+
>>> weights = pa.steering_vector(k, geom.x, geom.y, theta0_deg=30, phi0_deg=0)
|
|
26
|
+
>>>
|
|
27
|
+
>>> # Apply Taylor taper for sidelobe control
|
|
28
|
+
>>> taper = pa.taylor_taper_2d(10, 10, sidelobe_dB=-30)
|
|
29
|
+
>>> weights = weights * taper
|
|
30
|
+
>>>
|
|
31
|
+
>>> # Compute and plot pattern
|
|
32
|
+
>>> theta, phi, pattern_dB = pa.compute_full_pattern(geom.x, geom.y, weights, k)
|
|
33
|
+
"""
|
|
34
|
+
|
|
35
|
+
__version__ = "1.0.0"
|
|
36
|
+
|
|
37
|
+
# Core computation functions
|
|
38
|
+
from .core import (
|
|
39
|
+
steering_vector,
|
|
40
|
+
array_factor_vectorized,
|
|
41
|
+
array_factor_uv,
|
|
42
|
+
array_factor_fft,
|
|
43
|
+
element_pattern,
|
|
44
|
+
element_pattern_cosine_tapered,
|
|
45
|
+
total_pattern,
|
|
46
|
+
compute_pattern_cuts,
|
|
47
|
+
compute_full_pattern,
|
|
48
|
+
compute_directivity,
|
|
49
|
+
compute_half_power_beamwidth,
|
|
50
|
+
)
|
|
51
|
+
|
|
52
|
+
# Utility functions
|
|
53
|
+
from .utils import (
|
|
54
|
+
deg2rad,
|
|
55
|
+
rad2deg,
|
|
56
|
+
azel_to_thetaphi,
|
|
57
|
+
thetaphi_to_azel,
|
|
58
|
+
theta_phi_to_uv,
|
|
59
|
+
uv_to_theta_phi,
|
|
60
|
+
is_visible_region,
|
|
61
|
+
wavelength_to_k,
|
|
62
|
+
frequency_to_wavelength,
|
|
63
|
+
frequency_to_k,
|
|
64
|
+
db_to_linear,
|
|
65
|
+
linear_to_db,
|
|
66
|
+
normalize_pattern,
|
|
67
|
+
create_theta_phi_grid,
|
|
68
|
+
create_uv_grid,
|
|
69
|
+
)
|
|
70
|
+
|
|
71
|
+
# Geometry classes and functions
|
|
72
|
+
from .geometry import (
|
|
73
|
+
ArrayGeometry,
|
|
74
|
+
SubarrayArchitecture,
|
|
75
|
+
create_rectangular_array,
|
|
76
|
+
create_triangular_array,
|
|
77
|
+
create_elliptical_array,
|
|
78
|
+
create_circular_array,
|
|
79
|
+
create_concentric_rings_array,
|
|
80
|
+
create_cylindrical_array,
|
|
81
|
+
create_spherical_array,
|
|
82
|
+
thin_array_random,
|
|
83
|
+
thin_array_density_tapered,
|
|
84
|
+
thin_array_genetic_algorithm,
|
|
85
|
+
create_rectangular_subarrays,
|
|
86
|
+
compute_subarray_weights,
|
|
87
|
+
array_factor_conformal,
|
|
88
|
+
)
|
|
89
|
+
|
|
90
|
+
# Beamforming functions
|
|
91
|
+
from .beamforming import (
|
|
92
|
+
# Amplitude tapers
|
|
93
|
+
taylor_taper_1d,
|
|
94
|
+
taylor_taper_2d,
|
|
95
|
+
chebyshev_taper_1d,
|
|
96
|
+
chebyshev_taper_2d,
|
|
97
|
+
hamming_taper_1d,
|
|
98
|
+
hamming_taper_2d,
|
|
99
|
+
hanning_taper_1d,
|
|
100
|
+
hanning_taper_2d,
|
|
101
|
+
cosine_taper_1d,
|
|
102
|
+
cosine_taper_2d,
|
|
103
|
+
cosine_on_pedestal_taper_1d,
|
|
104
|
+
cosine_on_pedestal_taper_2d,
|
|
105
|
+
gaussian_taper_1d,
|
|
106
|
+
gaussian_taper_2d,
|
|
107
|
+
compute_taper_efficiency,
|
|
108
|
+
compute_taper_directivity_loss,
|
|
109
|
+
apply_taper_to_geometry,
|
|
110
|
+
# Null steering
|
|
111
|
+
null_steering_projection,
|
|
112
|
+
null_steering_lcmv,
|
|
113
|
+
compute_null_depth,
|
|
114
|
+
# Multiple beams
|
|
115
|
+
multi_beam_weights_superposition,
|
|
116
|
+
multi_beam_weights_orthogonal,
|
|
117
|
+
compute_beam_isolation,
|
|
118
|
+
monopulse_weights,
|
|
119
|
+
)
|
|
120
|
+
|
|
121
|
+
# Impairment models
|
|
122
|
+
from .impairments import (
|
|
123
|
+
# Mutual coupling
|
|
124
|
+
mutual_coupling_matrix_theoretical,
|
|
125
|
+
mutual_coupling_matrix_measured,
|
|
126
|
+
apply_mutual_coupling,
|
|
127
|
+
active_element_pattern,
|
|
128
|
+
# Phase quantization
|
|
129
|
+
quantize_phase,
|
|
130
|
+
quantization_rms_error,
|
|
131
|
+
quantization_sidelobe_increase,
|
|
132
|
+
analyze_quantization_effect,
|
|
133
|
+
# Element failures
|
|
134
|
+
simulate_element_failures,
|
|
135
|
+
analyze_graceful_degradation,
|
|
136
|
+
# Scan blindness
|
|
137
|
+
surface_wave_scan_angle,
|
|
138
|
+
scan_blindness_model,
|
|
139
|
+
apply_scan_blindness,
|
|
140
|
+
compute_scan_loss,
|
|
141
|
+
)
|
|
142
|
+
|
|
143
|
+
# Visualization functions
|
|
144
|
+
from .visualization import (
|
|
145
|
+
# 2D matplotlib plots
|
|
146
|
+
plot_pattern_2d,
|
|
147
|
+
plot_pattern_polar,
|
|
148
|
+
plot_pattern_contour,
|
|
149
|
+
plot_array_geometry,
|
|
150
|
+
# UV-space
|
|
151
|
+
compute_pattern_uv_space,
|
|
152
|
+
plot_pattern_uv_space,
|
|
153
|
+
# 3D Plotly plots
|
|
154
|
+
plot_pattern_3d_plotly,
|
|
155
|
+
plot_pattern_3d_cartesian_plotly,
|
|
156
|
+
plot_array_geometry_3d_plotly,
|
|
157
|
+
plot_pattern_uv_plotly,
|
|
158
|
+
# Utilities
|
|
159
|
+
plot_comparison_patterns,
|
|
160
|
+
create_pattern_animation_plotly,
|
|
161
|
+
)
|
|
162
|
+
|
|
163
|
+
__all__ = [
|
|
164
|
+
# Version
|
|
165
|
+
"__version__",
|
|
166
|
+
# Core
|
|
167
|
+
"steering_vector",
|
|
168
|
+
"array_factor_vectorized",
|
|
169
|
+
"array_factor_uv",
|
|
170
|
+
"array_factor_fft",
|
|
171
|
+
"element_pattern",
|
|
172
|
+
"element_pattern_cosine_tapered",
|
|
173
|
+
"total_pattern",
|
|
174
|
+
"compute_pattern_cuts",
|
|
175
|
+
"compute_full_pattern",
|
|
176
|
+
"compute_directivity",
|
|
177
|
+
"compute_half_power_beamwidth",
|
|
178
|
+
# Utils
|
|
179
|
+
"deg2rad",
|
|
180
|
+
"rad2deg",
|
|
181
|
+
"azel_to_thetaphi",
|
|
182
|
+
"thetaphi_to_azel",
|
|
183
|
+
"theta_phi_to_uv",
|
|
184
|
+
"uv_to_theta_phi",
|
|
185
|
+
"is_visible_region",
|
|
186
|
+
"wavelength_to_k",
|
|
187
|
+
"frequency_to_wavelength",
|
|
188
|
+
"frequency_to_k",
|
|
189
|
+
"db_to_linear",
|
|
190
|
+
"linear_to_db",
|
|
191
|
+
"normalize_pattern",
|
|
192
|
+
"create_theta_phi_grid",
|
|
193
|
+
"create_uv_grid",
|
|
194
|
+
# Geometry
|
|
195
|
+
"ArrayGeometry",
|
|
196
|
+
"SubarrayArchitecture",
|
|
197
|
+
"create_rectangular_array",
|
|
198
|
+
"create_triangular_array",
|
|
199
|
+
"create_elliptical_array",
|
|
200
|
+
"create_circular_array",
|
|
201
|
+
"create_concentric_rings_array",
|
|
202
|
+
"create_cylindrical_array",
|
|
203
|
+
"create_spherical_array",
|
|
204
|
+
"thin_array_random",
|
|
205
|
+
"thin_array_density_tapered",
|
|
206
|
+
"thin_array_genetic_algorithm",
|
|
207
|
+
"create_rectangular_subarrays",
|
|
208
|
+
"compute_subarray_weights",
|
|
209
|
+
"array_factor_conformal",
|
|
210
|
+
# Beamforming
|
|
211
|
+
"taylor_taper_1d",
|
|
212
|
+
"taylor_taper_2d",
|
|
213
|
+
"chebyshev_taper_1d",
|
|
214
|
+
"chebyshev_taper_2d",
|
|
215
|
+
"hamming_taper_1d",
|
|
216
|
+
"hamming_taper_2d",
|
|
217
|
+
"hanning_taper_1d",
|
|
218
|
+
"hanning_taper_2d",
|
|
219
|
+
"cosine_taper_1d",
|
|
220
|
+
"cosine_taper_2d",
|
|
221
|
+
"cosine_on_pedestal_taper_1d",
|
|
222
|
+
"cosine_on_pedestal_taper_2d",
|
|
223
|
+
"gaussian_taper_1d",
|
|
224
|
+
"gaussian_taper_2d",
|
|
225
|
+
"compute_taper_efficiency",
|
|
226
|
+
"compute_taper_directivity_loss",
|
|
227
|
+
"apply_taper_to_geometry",
|
|
228
|
+
"null_steering_projection",
|
|
229
|
+
"null_steering_lcmv",
|
|
230
|
+
"compute_null_depth",
|
|
231
|
+
"multi_beam_weights_superposition",
|
|
232
|
+
"multi_beam_weights_orthogonal",
|
|
233
|
+
"compute_beam_isolation",
|
|
234
|
+
"monopulse_weights",
|
|
235
|
+
# Impairments
|
|
236
|
+
"mutual_coupling_matrix_theoretical",
|
|
237
|
+
"mutual_coupling_matrix_measured",
|
|
238
|
+
"apply_mutual_coupling",
|
|
239
|
+
"active_element_pattern",
|
|
240
|
+
"quantize_phase",
|
|
241
|
+
"quantization_rms_error",
|
|
242
|
+
"quantization_sidelobe_increase",
|
|
243
|
+
"analyze_quantization_effect",
|
|
244
|
+
"simulate_element_failures",
|
|
245
|
+
"analyze_graceful_degradation",
|
|
246
|
+
"surface_wave_scan_angle",
|
|
247
|
+
"scan_blindness_model",
|
|
248
|
+
"apply_scan_blindness",
|
|
249
|
+
"compute_scan_loss",
|
|
250
|
+
# Visualization
|
|
251
|
+
"plot_pattern_2d",
|
|
252
|
+
"plot_pattern_polar",
|
|
253
|
+
"plot_pattern_contour",
|
|
254
|
+
"plot_array_geometry",
|
|
255
|
+
"compute_pattern_uv_space",
|
|
256
|
+
"plot_pattern_uv_space",
|
|
257
|
+
"plot_pattern_3d_plotly",
|
|
258
|
+
"plot_pattern_3d_cartesian_plotly",
|
|
259
|
+
"plot_array_geometry_3d_plotly",
|
|
260
|
+
"plot_pattern_uv_plotly",
|
|
261
|
+
"plot_comparison_patterns",
|
|
262
|
+
"create_pattern_animation_plotly",
|
|
263
|
+
]
|