Uniform Linear Arrays
Uniform linear array (ULA) gain patterns and steering vectors.
Provides functions to compute element steering vectors, apply inter-element time delays, and plot one-way and two-way array gain patterns as a function of angle.
apply_timeshift_due_to_element_position(signal_ar, fs, element_position, tgt_angle)
Applies a time shift to a signal based on element position and angle.
This function models the delay or advance a signal experiences when arriving at an off-center antenna element from a specific target angle. The time shift is applied by resampling the signal using cubic interpolation.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
signal_ar
|
ndarray
|
A complex time-series signal from a single antenna element. |
required |
fs
|
float
|
The sampling frequency of the signal in Hertz. |
required |
element_position
|
float
|
The element's position relative to the array's phase center in meters. |
required |
tgt_angle
|
float
|
The angle of the target in degrees, where 0 is broadside. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
np.ndarray: The time-shifted complex signal. |
Source code in src/rad_lab/uniform_linear_arrays.py
189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 | |
array_phase_center(position_ar, weight_ar)
Calculates the phase center of an antenna array.
The phase center is the apparent point from which the radiation emanates. It is calculated as the weighted average of the element positions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
position_ar
|
ndarray
|
1D array of element positions. The unit of the output will match the unit of this input (e.g., meters). |
required |
weight_ar
|
ndarray
|
A vector of complex weights for each element. The magnitude of the weights is used in the calculation. |
required |
Returns:
| Name | Type | Description |
|---|---|---|
float |
float
|
The position of the array's phase center. |
Source code in src/rad_lab/uniform_linear_arrays.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 | |
linear_antenna_gain(el_pos, weight_vec=None, N_theta=10000, steer_angle=0, plot=False)
Calculates the complex voltage gain pattern for a linear antenna array.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
el_pos
|
ndarray
|
1D array of element positions, normalized by the signal wavelength. |
required |
weight_vec
|
ndarray
|
A vector of complex weights for each antenna element. If None, uniform weights (all ones) are used. Defaults to None. |
None
|
N_theta
|
int
|
The number of angular points to calculate the gain over. Defaults to 10000. |
10000
|
steer_angle
|
float
|
The angle in degrees at which to steer the main beam. 0 degrees is broadside. Defaults to 0. |
0
|
plot
|
bool
|
If True, plots the gain pattern in dBi. Defaults to False. |
False
|
Returns:
| Type | Description |
|---|---|
tuple[ndarray, ndarray]
|
tuple[np.ndarray, np.ndarray]:
- theta_vec (np.ndarray): The grid of angles in degrees, from -90 to 90.
- gain_vec (np.ndarray): The complex voltage gain at each angle in |
Source code in src/rad_lab/uniform_linear_arrays.py
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 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 | |
linear_antenna_gain_N_db(N_el, dx, weight_vec=None, N_theta=10000, steer_angle=0, plot=False)
Calculates gain pattern in dBi for a uniform linear array.
This function defines the array geometry based on the number of elements and their uniform spacing. It then computes and returns the gain in dBi.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
N_el
|
int
|
The number of antenna array elements. |
required |
dx
|
float
|
The spacing between elements, normalized by signal wavelength. |
required |
weight_vec
|
ndarray
|
A vector of complex weights for each antenna element. If None, uniform weights are used. Defaults to None. |
None
|
N_theta
|
int
|
The number of angular points to calculate the gain over. Defaults to 10000. |
10000
|
steer_angle
|
float
|
The angle in degrees at which to steer the main beam. 0 degrees is broadside. Defaults to 0. |
0
|
plot
|
bool
|
If True, plots the gain pattern in dBi. Defaults to False. |
False
|
Returns:
| Type | Description |
|---|---|
tuple[ndarray, ndarray]
|
tuple[np.ndarray, np.ndarray]: - theta_vec (np.ndarray): The grid of angles in degrees, from -90 to 90. - gain_vec_db (np.ndarray): The voltage gain in dBi at each angle. |
Source code in src/rad_lab/uniform_linear_arrays.py
128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | |
linear_antenna_gain_meters(el_pos, fc, weight_vec=None, N_theta=10000, steer_angle=0, plot=False)
Calculates gain pattern from element positions in meters and frequency.
This is a convenience wrapper for linear_antenna_gain that converts
physical positions and frequency into wavelength-normalized positions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
el_pos
|
ndarray
|
1D array of element positions in meters. |
required |
fc
|
float
|
The signal's center frequency in Hertz. |
required |
weight_vec
|
ndarray
|
A vector of complex weights for each antenna element. If None, uniform weights are used. Defaults to None. |
None
|
N_theta
|
int
|
The number of angular points to calculate the gain over. Defaults to 10000. |
10000
|
steer_angle
|
float
|
The angle in degrees at which to steer the main beam. 0 degrees is broadside. Defaults to 0. |
0
|
plot
|
bool
|
If True, plots the gain pattern in dBi. Defaults to False. |
False
|
Returns:
| Type | Description |
|---|---|
tuple[ndarray, ndarray]
|
tuple[np.ndarray, np.ndarray]: - theta_vec (np.ndarray): The grid of angles in degrees, from -90 to 90. - gain_vec (np.ndarray): The complex voltage gain at each angle. |
Source code in src/rad_lab/uniform_linear_arrays.py
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 115 116 117 118 119 120 121 122 123 124 125 | |
steering_vector(el_pos, theta)
Computes the Vandermonde steering vector for a linear array.
This vector represents the phase shifts of a planar wave arriving from a specific angle as measured at each element of the array.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
el_pos
|
ndarray
|
A 1D array of antenna element positions, normalized by the signal wavelength. |
required |
theta
|
float
|
The steering angle in degrees, where 0 is broadside. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
np.ndarray: A complex-valued steering vector of the same size as |
Source code in src/rad_lab/uniform_linear_arrays.py
18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 | |
ula_pattern(el_pos, weight_vec=None, two_way=True)
Creates a beam-pattern callable from a ULA for use with SAR spotlight.
Precomputes the array factor via :func:linear_antenna_gain, normalises
to unit peak, and returns a function that maps off-boresight angles
(in radians) to amplitude weights. The returned callable is directly
compatible with the beam_pattern parameter of :func:rad_lab.sar.gen.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
el_pos
|
ndarray
|
Element positions normalised by wavelength. |
required |
weight_vec
|
ndarray | None
|
Optional complex element weights (default: uniform). |
None
|
two_way
|
bool
|
If True (default), square the one-way voltage pattern to model the round-trip amplitude. |
True
|
Returns:
| Type | Description |
|---|---|
Callable[[ndarray], ndarray]
|
A callable |
Callable[[ndarray], ndarray]
|
an array of off-boresight angles [rad] and weights is a |
Callable[[ndarray], ndarray]
|
same-shape array of amplitude weights in [0, 1]. |
Source code in src/rad_lab/uniform_linear_arrays.py
221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 | |