Antenna¶
Antenna gain models implementing the AntennaModel protocol.
Parametric Antenna¶
ParametricAntenna
¶
Fixed-gain antenna model (e.g., parabolic dish or specified gain).
Returns the same gain in all directions — useful for quick link budgets where the antenna pattern is not the focus.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
gain_dbi
|
float
|
Isotropic antenna gain in dBi (default 0.0). |
0.0
|
scan_loss_model
|
str
|
Scan-loss model name (default |
'none'
|
Examples:
>>> ant = ParametricAntenna(gain_dbi=36.0)
>>> float(ant.gain_dbi(np.array([30.0]), np.array([0.0]), 12e9)[0])
36.0
Source code in src/opensatcom/antenna/parametric.py
gain_dbi
¶
Return fixed gain for all directions.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
theta_deg
|
ndarray
|
Elevation angles in degrees. |
required |
phi_deg
|
ndarray
|
Azimuth angles in degrees. |
required |
f_hz
|
float
|
Carrier frequency in Hz (unused). |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Constant gain array in dBi, same shape as theta_deg. |
Source code in src/opensatcom/antenna/parametric.py
eirp_dbw
¶
Compute EIRP in a given direction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
theta_deg
|
float
|
Elevation angle in degrees. |
required |
phi_deg
|
float
|
Azimuth angle in degrees. |
required |
f_hz
|
float
|
Carrier frequency in Hz (unused). |
required |
tx_power_w
|
float
|
Transmit power in watts. |
required |
Returns:
| Type | Description |
|---|---|
float
|
EIRP in dBW ( |
Source code in src/opensatcom/antenna/parametric.py
Cosine Rolloff Antenna¶
CosineRolloffAntenna
¶
CosineRolloffAntenna(peak_gain_dbi, theta_3db_deg, sidelobe_floor_dbi=-20.0, boresight_az_deg=0.0, boresight_el_deg=0.0)
Simple analytic antenna model with cosine-squared rolloff.
Gain pattern: gain(theta_off) = peak_gain_dbi - 12*(theta_off / theta_3db)^2 for theta_off < theta_3db * 2.6, otherwise sidelobe_floor_dbi.
This produces a realistic off-axis pattern suitable for multi-beam interference analysis without requiring the full PAM library.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
peak_gain_dbi
|
float
|
Peak (boresight) antenna gain in dBi. |
required |
theta_3db_deg
|
float
|
Half-power (3 dB) beamwidth in degrees. |
required |
sidelobe_floor_dbi
|
float
|
Minimum gain floor representing the sidelobe level, in dBi. Default is -20.0. |
-20.0
|
boresight_az_deg
|
float
|
Azimuth angle of the boresight direction in degrees. Default is 0.0. |
0.0
|
boresight_el_deg
|
float
|
Elevation angle of the boresight direction in degrees. Default is 0.0. |
0.0
|
Examples:
>>> ant = CosineRolloffAntenna(peak_gain_dbi=36.0, theta_3db_deg=1.5)
>>> ant.gain_toward_dbi(az_deg=0.0, el_deg=0.0, f_hz=12e9)
36.0
Source code in src/opensatcom/antenna/cosine.py
peak_gain_dbi
property
¶
Peak (boresight) antenna gain.
Returns:
| Type | Description |
|---|---|
float
|
Peak gain in dBi. |
theta_3db_deg
property
¶
Half-power (3 dB) beamwidth.
Returns:
| Type | Description |
|---|---|
float
|
Beamwidth in degrees. |
sidelobe_floor_dbi
property
¶
Minimum gain floor representing the sidelobe level.
Returns:
| Type | Description |
|---|---|
float
|
Sidelobe floor in dBi. |
boresight_az_deg
property
¶
Azimuth angle of the boresight direction.
Returns:
| Type | Description |
|---|---|
float
|
Boresight azimuth in degrees. |
boresight_el_deg
property
¶
Elevation angle of the boresight direction.
Returns:
| Type | Description |
|---|---|
float
|
Boresight elevation in degrees. |
gain_dbi
¶
Return gain accounting for off-axis rolloff.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
theta_deg
|
ndarray
|
Azimuth angles in degrees. |
required |
phi_deg
|
ndarray
|
Elevation angles in degrees. |
required |
f_hz
|
float
|
Frequency in Hz. Unused in this analytic model but accepted
for interface compatibility with |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Gain values in dBi, clamped to the sidelobe floor. |
Source code in src/opensatcom/antenna/cosine.py
gain_toward_dbi
¶
Scalar convenience: gain in a specific direction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
az_deg
|
float
|
Azimuth angle in degrees toward which to evaluate the gain. |
required |
el_deg
|
float
|
Elevation angle in degrees toward which to evaluate the gain. |
required |
f_hz
|
float
|
Frequency in Hz. Unused in this analytic model but accepted
for interface compatibility with |
required |
Returns:
| Type | Description |
|---|---|
float
|
Antenna gain in the specified direction, in dBi. |
Source code in src/opensatcom/antenna/cosine.py
eirp_dbw
¶
Compute EIRP in a given direction.
EIRP is calculated as Ptx(dBW) + G(dBi) where the gain is
evaluated at the specified azimuth/elevation angles.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
theta_deg
|
float
|
Azimuth angle in degrees toward which to evaluate the EIRP. |
required |
phi_deg
|
float
|
Elevation angle in degrees toward which to evaluate the EIRP. |
required |
f_hz
|
float
|
Frequency in Hz. Passed through to :meth: |
required |
tx_power_w
|
float
|
Transmit power in Watts. |
required |
Returns:
| Type | Description |
|---|---|
float
|
Effective isotropic radiated power in dBW. |
Source code in src/opensatcom/antenna/cosine.py
PAM Array Antenna¶
PamArrayAntenna
¶
PamArrayAntenna(nx=1, ny=1, dx_lambda=0.5, dy_lambda=0.5, taper=None, steering=None, impairments=None)
Planar phased-array antenna on an Nx-by-Ny rectangular lattice.
Two beam modes:
steering=None(default): a tracking beam. The array is assumed to steer its beam electronically onto whatever direction is being evaluated, so every direction returns the peak gain. This models a terminal that follows the satellite. Elements are isotropic, so the scan-dependent losses of a real terminal (element rolloff, projected aperture) are not modeled.steering=(theta0_deg, phi0_deg): a fixed beam. Angles passed to :meth:gain_dbiare then directions in the array's own frame, theta measured from the array normal, and the returned gain follows the real array factor of the tapered, steered lattice: peak at the steering direction, real sidelobe structure away from it. Requiresphased-array-modeling <https://pypi.org/project/phased-array-modeling/>_ (thepamextra).
Without the package installed a fixed beam degrades to peak gain at all angles, with a warning: link budgets stay usable, pattern shaping is off.
In all modes the peak gain is the standard aperture estimate
D = 4 * pi * Nx * dx * Ny * dy (spacings in wavelengths), reduced by
the taper efficiency when a taper is synthesized.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
nx
|
int
|
Number of elements along the x-axis, by default 1. |
1
|
ny
|
int
|
Number of elements along the y-axis, by default 1. |
1
|
dx_lambda
|
float
|
Element spacing along x in wavelengths, by default 0.5. |
0.5
|
dy_lambda
|
float
|
Element spacing along y in wavelengths, by default 0.5. |
0.5
|
taper
|
tuple of (str, float), str, or None
|
Amplitude taper. A name ( |
None
|
steering
|
tuple of (float, float) or None
|
Fixed beam direction |
None
|
impairments
|
Any or None
|
Reserved for element-level impairment models. Currently unused and ignored with a warning if set, by default None. |
None
|
Source code in src/opensatcom/antenna/pam.py
gain_dbi
¶
Gain in dBi at the requested directions.
A tracking beam (steering=None) returns the peak gain for every
direction. A fixed beam returns the normalized array factor of the
tapered, steered lattice referenced to the peak gain; angles are then
directions in the array frame, theta measured from the array normal.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
theta_deg
|
ndarray
|
Angles in degrees (array-frame theta for a fixed beam). Output shape matches this. |
required |
phi_deg
|
ndarray
|
Azimuth angles in degrees, broadcastable with |
required |
f_hz
|
float
|
Operating frequency in hertz. Unused: spacings are given in wavelengths, so the pattern is frequency-independent. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Gain values in dBi, same shape as |
Source code in src/opensatcom/antenna/pam.py
eirp_dbw
¶
EIRP = Ptx(dBW) + G(dBi) toward the requested direction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
theta_deg
|
float
|
Angle from boresight in degrees toward the target. |
required |
phi_deg
|
float
|
Azimuth angle in degrees toward the target. |
required |
f_hz
|
float
|
Operating frequency in hertz. |
required |
tx_power_w
|
float
|
Transmitter output power in watts (linear). |
required |
Returns:
| Type | Description |
|---|---|
float
|
EIRP in dBW. |
Source code in src/opensatcom/antenna/pam.py
Coupling-Aware Antenna¶
CouplingAwareAntenna
¶
Antenna model using EdgeFEM coupling data for direction-dependent gain.
Computes array gain using embedded element patterns corrected for mutual coupling. The gain at each direction accounts for: 1. Active element patterns (from EdgeFEM simulation) 2. Coupling correction via S-parameter matrix 3. Array factor with element positions and steering weights
Angle convention (matches the pattern grid and the link engine's call order): the first angle is theta, the polar angle from the array normal in degrees (the grid's first axis); the second is phi, the azimuthal angle around the normal (the grid's second axis). Direction cosines are u = sin(theta) cos(phi), v = sin(theta) sin(phi).
The coupling correction is the (I + S)^-1 form: coupling_matrix is a
scattering matrix at the artifact's reference impedance, and the active
element response is (I + S)^-1 applied to the isolated responses. A
producer exporting anything other than S-parameters breaks this term.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
coupling_data
|
CouplingData
|
Coupling data loaded from an EdgeFEM artifact. |
required |
steering_az_deg
|
float
|
Steering phi (azimuthal angle around the array normal), degrees. The parameter name is historical; it maps to phi above. |
0.0
|
steering_el_deg
|
float
|
Steering theta (polar angle from the array normal), degrees. The parameter name is historical; it maps to theta above. |
0.0
|
Source code in src/opensatcom/antenna/coupling.py
gain_dbi
¶
Return gain in dBi accounting for coupling effects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
theta_deg
|
ndarray
|
Polar angles from the array normal in degrees. |
required |
phi_deg
|
ndarray
|
Azimuthal angles in degrees. |
required |
f_hz
|
float
|
Carrier frequency in Hz (for reference; pattern data at nearest freq). |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Gain values in dBi, same shape as theta_deg. |
Source code in src/opensatcom/antenna/coupling.py
eirp_dbw
¶
Compute EIRP in a given direction.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
theta_deg
|
float
|
Azimuth angle in degrees. |
required |
phi_deg
|
float
|
Elevation angle in degrees. |
required |
f_hz
|
float
|
Carrier frequency in Hz. |
required |
tx_power_w
|
float
|
Transmit power in watts. |
required |
Returns:
| Type | Description |
|---|---|
float
|
EIRP in dBW. |
Source code in src/opensatcom/antenna/coupling.py
from_npz
classmethod
¶
Load coupling data from .npz and construct antenna.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
artifact_path
|
str or Path
|
Path to the |
required |
steering_az_deg
|
float
|
Beam steering azimuth in degrees (default 0.0). |
0.0
|
steering_el_deg
|
float
|
Beam steering elevation in degrees (default 0.0). |
0.0
|
Returns:
| Type | Description |
|---|---|
CouplingAwareAntenna
|
Constructed antenna with loaded coupling data. |
Source code in src/opensatcom/antenna/coupling.py
from_array_package
classmethod
¶
from_array_package(json_path, patterns_csv_path=None, steering_az_deg=0.0, steering_el_deg=0.0, freq_hz=None)
Load an EdgeFEM ArrayPackage JSON and construct the antenna.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
json_path
|
str or Path
|
|
required |
patterns_csv_path
|
str or Path
|
Companion embedded-patterns CSV; without it, element patterns fall back to the loader's default. |
None
|
steering_az_deg
|
float
|
Beam steering angles in degrees. |
0.0
|
steering_el_deg
|
float
|
Beam steering angles in degrees. |
0.0
|
freq_hz
|
float
|
Frequency to slice the S-matrices at (nearest match); defaults to the loader's choice. |
None
|
Source code in src/opensatcom/antenna/coupling.py
EdgeFEM Loader¶
edgefem_loader
¶
EdgeFEM artifact loading — coupling matrices and element patterns.
CouplingData
dataclass
¶
CouplingData(coupling_matrix, element_patterns, theta_grid_deg, phi_grid_deg, freq_hz, array_positions_m, metadata=dict())
Parsed coupling and element pattern data from EdgeFEM artifacts.
Attributes:
| Name | Type | Description |
|---|---|---|
coupling_matrix |
complex scattering matrix, shape (N_elem, N_elem).
|
Consumers apply the (I + S)^-1 coupling correction; see CouplingAwareAntenna. |
element_patterns |
linear complex voltage patterns relative to isotropic,
|
shape (N_elem, N_theta, N_phi); |p|^2 is element gain. |
theta_grid_deg |
polar angle from the array normal, degrees, shape
|
(N_theta,), strictly increasing. |
phi_grid_deg |
azimuthal angle around the normal, degrees, shape
|
(N_phi,), strictly increasing. |
freq_hz |
frequency (scalar or array of frequencies)
|
|
array_positions_m |
element positions, shape (N_elem, 2) or (N_elem, 3)
|
|
metadata |
additional metadata from the artifact
|
|
load_npz_artifact
¶
Load coupling data from the six-key .npz layout.
This is opensatcom's own historical layout, kept for backward
compatibility with existing fixtures. EdgeFEM has never produced it: what
EdgeFEM actually ships is the EdgeFEM_ArrayPackage JSON plus a
two-cut pattern CSV, loaded by
:func:opensatcom.antenna.edgefem_json_loader.load_array_package.
Expected arrays in the .npz: - coupling_matrix: (N_elem, N_elem) complex - element_patterns: (N_elem, N_theta, N_phi) complex - theta_grid_deg: (N_theta,) - phi_grid_deg: (N_phi,) - freq_hz: scalar or (N_freq,) - array_positions_m: (N_elem, 2) or (N_elem, 3)
Optional: - metadata_keys, metadata_values: parallel arrays for metadata