phased-array-modeling 1.3.2__tar.gz → 1.4.0__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.
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/PKG-INFO +4 -3
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/README.md +2 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/phased_array/__init__.py +26 -1
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/phased_array/geometry.py +27 -5
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/phased_array/polarization.py +4 -4
- phased_array_modeling-1.4.0/phased_array/vector_patterns.py +725 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/phased_array_modeling.egg-info/PKG-INFO +4 -3
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/phased_array_modeling.egg-info/SOURCES.txt +2 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/pyproject.toml +2 -3
- phased_array_modeling-1.4.0/tests/test_vector_patterns.py +382 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/LICENSE +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/phased_array/beamforming.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/phased_array/coordinates.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/phased_array/core.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/phased_array/export.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/phased_array/impairments.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/phased_array/utils.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/phased_array/visualization.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/phased_array/wideband.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/phased_array_modeling.egg-info/dependency_links.txt +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/phased_array_modeling.egg-info/requires.txt +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/phased_array_modeling.egg-info/top_level.txt +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/setup.cfg +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/tests/test_beamforming.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/tests/test_coordinates.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/tests/test_core.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/tests/test_docstrings.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/tests/test_export.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/tests/test_geometry.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/tests/test_impairments.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/tests/test_polarization.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/tests/test_utils.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/tests/test_visualization.py +0 -0
- {phased_array_modeling-1.3.2 → phased_array_modeling-1.4.0}/tests/test_wideband.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: phased-array-modeling
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.4.0
|
|
4
4
|
Summary: Comprehensive Python library for phased array antenna modeling and visualization
|
|
5
5
|
Author-email: John Hodge <jah70@vt.edu>
|
|
6
6
|
License: MIT
|
|
@@ -15,14 +15,13 @@ Classifier: Intended Audience :: Education
|
|
|
15
15
|
Classifier: License :: OSI Approved :: MIT License
|
|
16
16
|
Classifier: Operating System :: OS Independent
|
|
17
17
|
Classifier: Programming Language :: Python :: 3
|
|
18
|
-
Classifier: Programming Language :: Python :: 3.8
|
|
19
18
|
Classifier: Programming Language :: Python :: 3.9
|
|
20
19
|
Classifier: Programming Language :: Python :: 3.10
|
|
21
20
|
Classifier: Programming Language :: Python :: 3.11
|
|
22
21
|
Classifier: Programming Language :: Python :: 3.12
|
|
23
22
|
Classifier: Topic :: Scientific/Engineering
|
|
24
23
|
Classifier: Topic :: Scientific/Engineering :: Physics
|
|
25
|
-
Requires-Python: >=3.
|
|
24
|
+
Requires-Python: >=3.9
|
|
26
25
|
Description-Content-Type: text/markdown
|
|
27
26
|
License-File: LICENSE
|
|
28
27
|
Requires-Dist: numpy>=1.20.0
|
|
@@ -63,6 +62,7 @@ A comprehensive Python library for computing and visualizing phased array antenn
|
|
|
63
62
|
- **Multiple Geometries**: Rectangular, triangular, circular, cylindrical, spherical, sparse/thinned arrays
|
|
64
63
|
- **Beamforming**: Amplitude tapering (Taylor, Chebyshev, etc.), null steering, multi-beam
|
|
65
64
|
- **Realistic Impairments**: Mutual coupling, phase quantization, element failures, scan blindness
|
|
65
|
+
- **Polarized Patterns**: Vector (E-theta, E-phi) patterns with dipole/patch/CP element models, co/cross-pol cuts, axial ratio and XPD maps, measured element pattern import
|
|
66
66
|
- **Visualization**: 2D matplotlib, interactive 3D Plotly, UV-space representation
|
|
67
67
|
- **Subarray Support**: Subarray-level beamforming with quantized phase shifters
|
|
68
68
|
- **Data Export**: CSV, JSON, and NumPy formats for patterns, weights, and geometry
|
|
@@ -239,6 +239,7 @@ phased_array/
|
|
|
239
239
|
├── impairments.py # Coupling, quantization, failures, scan blindness
|
|
240
240
|
├── wideband.py # True-time-delay steering, beam squint, bandwidth
|
|
241
241
|
├── polarization.py # Jones/Stokes, axial ratio, XPD, Ludwig-3
|
|
242
|
+
├── vector_patterns.py # Polarized elements, vector AF, co/cross patterns
|
|
242
243
|
├── coordinates.py # Antenna/radar/cone frames, pattern rotation
|
|
243
244
|
├── export.py # CSV/JSON/NPZ export, summary reports
|
|
244
245
|
├── visualization.py # 2D, 3D Plotly, UV-space plotting
|
|
@@ -17,6 +17,7 @@ A comprehensive Python library for computing and visualizing phased array antenn
|
|
|
17
17
|
- **Multiple Geometries**: Rectangular, triangular, circular, cylindrical, spherical, sparse/thinned arrays
|
|
18
18
|
- **Beamforming**: Amplitude tapering (Taylor, Chebyshev, etc.), null steering, multi-beam
|
|
19
19
|
- **Realistic Impairments**: Mutual coupling, phase quantization, element failures, scan blindness
|
|
20
|
+
- **Polarized Patterns**: Vector (E-theta, E-phi) patterns with dipole/patch/CP element models, co/cross-pol cuts, axial ratio and XPD maps, measured element pattern import
|
|
20
21
|
- **Visualization**: 2D matplotlib, interactive 3D Plotly, UV-space representation
|
|
21
22
|
- **Subarray Support**: Subarray-level beamforming with quantized phase shifters
|
|
22
23
|
- **Data Export**: CSV, JSON, and NumPy formats for patterns, weights, and geometry
|
|
@@ -193,6 +194,7 @@ phased_array/
|
|
|
193
194
|
├── impairments.py # Coupling, quantization, failures, scan blindness
|
|
194
195
|
├── wideband.py # True-time-delay steering, beam squint, bandwidth
|
|
195
196
|
├── polarization.py # Jones/Stokes, axial ratio, XPD, Ludwig-3
|
|
197
|
+
├── vector_patterns.py # Polarized elements, vector AF, co/cross patterns
|
|
196
198
|
├── coordinates.py # Antenna/radar/cone frames, pattern rotation
|
|
197
199
|
├── export.py # CSV/JSON/NPZ export, summary reports
|
|
198
200
|
├── visualization.py # 2D, 3D Plotly, UV-space plotting
|
|
@@ -9,6 +9,7 @@ antenna radiation patterns, including:
|
|
|
9
9
|
- Various array geometries (rectangular, circular, conformal, sparse)
|
|
10
10
|
- Beamforming techniques (tapering, null steering, multi-beam)
|
|
11
11
|
- Realistic impairments (mutual coupling, quantization, failures, scan blindness)
|
|
12
|
+
- Vector (polarized) patterns: co/cross-pol, axial ratio, XPD, conformal
|
|
12
13
|
- Interactive 3D visualization with Plotly
|
|
13
14
|
- UV-space pattern representation
|
|
14
15
|
|
|
@@ -32,7 +33,7 @@ Example
|
|
|
32
33
|
>>> theta, phi, pattern_dB = pa.compute_full_pattern(geom.x, geom.y, weights, k)
|
|
33
34
|
"""
|
|
34
35
|
|
|
35
|
-
__version__ = "1.
|
|
36
|
+
__version__ = "1.4.0"
|
|
36
37
|
|
|
37
38
|
# Beamforming functions
|
|
38
39
|
from .beamforming import ( # Amplitude tapers; Null steering; Multiple beams; Beam spoiling; Adaptive
|
|
@@ -95,6 +96,16 @@ from .utils import (azel_to_thetaphi, create_theta_phi_grid, create_uv_grid,
|
|
|
95
96
|
frequency_to_wavelength, is_visible_region, linear_to_db,
|
|
96
97
|
normalize_pattern, rad2deg, theta_phi_to_uv,
|
|
97
98
|
thetaphi_to_azel, uv_to_theta_phi, wavelength_to_k)
|
|
99
|
+
# Vector (polarized) pattern functions
|
|
100
|
+
from .vector_patterns import (GriddedElementPattern, VectorPattern,
|
|
101
|
+
compute_co_cross_pattern_cuts,
|
|
102
|
+
compute_full_vector_pattern,
|
|
103
|
+
cos_q_polarized_element, crossed_dipole_element,
|
|
104
|
+
dipole_element, dual_pol_weights,
|
|
105
|
+
element_rotation_matrices,
|
|
106
|
+
global_to_local_angles, ideal_patch_element,
|
|
107
|
+
vector_array_factor_conformal,
|
|
108
|
+
vector_total_pattern)
|
|
98
109
|
# Visualization functions
|
|
99
110
|
from .visualization import ( # 2D matplotlib plots; UV-space; 3D Plotly plots; Wideband
|
|
100
111
|
compute_pattern_uv_space, create_pattern_animation_plotly,
|
|
@@ -278,4 +289,18 @@ __all__ = [
|
|
|
278
289
|
"rotation_matrix_pitch",
|
|
279
290
|
"rotation_matrix_yaw",
|
|
280
291
|
"rotate_pattern",
|
|
292
|
+
# Vector (polarized) patterns
|
|
293
|
+
"VectorPattern",
|
|
294
|
+
"GriddedElementPattern",
|
|
295
|
+
"dipole_element",
|
|
296
|
+
"ideal_patch_element",
|
|
297
|
+
"cos_q_polarized_element",
|
|
298
|
+
"crossed_dipole_element",
|
|
299
|
+
"vector_total_pattern",
|
|
300
|
+
"compute_full_vector_pattern",
|
|
301
|
+
"compute_co_cross_pattern_cuts",
|
|
302
|
+
"dual_pol_weights",
|
|
303
|
+
"element_rotation_matrices",
|
|
304
|
+
"global_to_local_angles",
|
|
305
|
+
"vector_array_factor_conformal",
|
|
281
306
|
]
|
|
@@ -32,6 +32,13 @@ class ArrayGeometry:
|
|
|
32
32
|
Element normal z-components
|
|
33
33
|
element_indices : ndarray, optional
|
|
34
34
|
Original indices before any thinning (for tracking)
|
|
35
|
+
tx : ndarray, optional
|
|
36
|
+
Element tangent x-components (local x-axis / polarization
|
|
37
|
+
reference for conformal vector patterns)
|
|
38
|
+
ty : ndarray, optional
|
|
39
|
+
Element tangent y-components
|
|
40
|
+
tz : ndarray, optional
|
|
41
|
+
Element tangent z-components
|
|
35
42
|
"""
|
|
36
43
|
x: np.ndarray
|
|
37
44
|
y: np.ndarray
|
|
@@ -40,6 +47,9 @@ class ArrayGeometry:
|
|
|
40
47
|
ny: Optional[np.ndarray] = None
|
|
41
48
|
nz: Optional[np.ndarray] = None
|
|
42
49
|
element_indices: Optional[np.ndarray] = None
|
|
50
|
+
tx: Optional[np.ndarray] = None
|
|
51
|
+
ty: Optional[np.ndarray] = None
|
|
52
|
+
tz: Optional[np.ndarray] = None
|
|
43
53
|
|
|
44
54
|
@property
|
|
45
55
|
def n_elements(self) -> int:
|
|
@@ -74,7 +84,10 @@ class ArrayGeometry:
|
|
|
74
84
|
nx=self.nx.copy() if self.nx is not None else None,
|
|
75
85
|
ny=self.ny.copy() if self.ny is not None else None,
|
|
76
86
|
nz=self.nz.copy() if self.nz is not None else None,
|
|
77
|
-
element_indices=self.element_indices.copy() if self.element_indices is not None else None
|
|
87
|
+
element_indices=self.element_indices.copy() if self.element_indices is not None else None,
|
|
88
|
+
tx=self.tx.copy() if self.tx is not None else None,
|
|
89
|
+
ty=self.ty.copy() if self.ty is not None else None,
|
|
90
|
+
tz=self.tz.copy() if self.tz is not None else None
|
|
78
91
|
)
|
|
79
92
|
|
|
80
93
|
|
|
@@ -997,6 +1010,13 @@ def array_factor_conformal(
|
|
|
997
1010
|
obs_y = np.sin(theta_flat) * np.sin(phi_flat)
|
|
998
1011
|
obs_z = np.cos(theta_flat)
|
|
999
1012
|
|
|
1013
|
+
has_normals = (geometry.nx is not None and geometry.ny is not None
|
|
1014
|
+
and geometry.nz is not None)
|
|
1015
|
+
if has_normals and element_pattern_func is not None:
|
|
1016
|
+
from .vector_patterns import (element_rotation_matrices,
|
|
1017
|
+
global_to_local_angles)
|
|
1018
|
+
R = element_rotation_matrices(geometry)
|
|
1019
|
+
|
|
1000
1020
|
AF = np.zeros(n_angles, dtype=complex)
|
|
1001
1021
|
|
|
1002
1022
|
for i in range(geometry.n_elements):
|
|
@@ -1006,7 +1026,7 @@ def array_factor_conformal(
|
|
|
1006
1026
|
phase += k * geometry.z[i] * obs_z
|
|
1007
1027
|
|
|
1008
1028
|
# Element pattern correction for orientation
|
|
1009
|
-
if
|
|
1029
|
+
if has_normals:
|
|
1010
1030
|
# Cosine of angle between observation direction and element normal
|
|
1011
1031
|
cos_angle = (geometry.nx[i] * obs_x +
|
|
1012
1032
|
geometry.ny[i] * obs_y +
|
|
@@ -1014,9 +1034,11 @@ def array_factor_conformal(
|
|
|
1014
1034
|
cos_angle = np.maximum(cos_angle, 0) # Only forward hemisphere
|
|
1015
1035
|
|
|
1016
1036
|
if element_pattern_func is not None:
|
|
1017
|
-
#
|
|
1018
|
-
local_theta =
|
|
1019
|
-
|
|
1037
|
+
# Observation angles in the element's local frame
|
|
1038
|
+
local_theta, local_phi = global_to_local_angles(
|
|
1039
|
+
R[i], theta_flat, phi_flat
|
|
1040
|
+
)
|
|
1041
|
+
element_gain = element_pattern_func(local_theta, local_phi, **element_kwargs)
|
|
1020
1042
|
else:
|
|
1021
1043
|
element_gain = cos_angle # Simple cosine pattern
|
|
1022
1044
|
else:
|
|
@@ -81,13 +81,13 @@ def stokes_parameters(jones: np.ndarray) -> Tuple[float, float, float, float]:
|
|
|
81
81
|
Returns
|
|
82
82
|
-------
|
|
83
83
|
S0 : float or ndarray
|
|
84
|
-
Total intensity:
|
|
84
|
+
Total intensity: ``|Ex|^2 + |Ey|^2``
|
|
85
85
|
S1 : float or ndarray
|
|
86
|
-
Linear horizontal-vertical:
|
|
86
|
+
Linear horizontal-vertical: ``|Ex|^2 - |Ey|^2``
|
|
87
87
|
S2 : float or ndarray
|
|
88
|
-
Linear +45/-45: 2*Re(Ex*Ey
|
|
88
|
+
Linear +45/-45: ``2*Re(Ex*conj(Ey))``
|
|
89
89
|
S3 : float or ndarray
|
|
90
|
-
Circular right-left: 2*Im(Ex*Ey
|
|
90
|
+
Circular right-left: ``2*Im(Ex*conj(Ey))``
|
|
91
91
|
|
|
92
92
|
Examples
|
|
93
93
|
--------
|