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)
Phased array antenna wrapping PAM, with analytic fallback.
Models a planar phased-array antenna as an Nx-by-Ny rectangular lattice
of isotropic elements. When the optional PAM package is installed, the
full pattern synthesis engine is used; otherwise an analytic peak-gain
approximation is provided via the standard aperture formula
D = 4 * pi * Nx * dx * Ny * dy (element spacings in wavelengths).
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 specification. Can be a taper name string (e.g.
|
None
|
steering
|
Any or None
|
Beam-steering specification passed through to PAM. Ignored when PAM is not available, by default None. |
None
|
impairments
|
Any or None
|
Element-level impairment model (amplitude/phase errors) passed through to PAM. Ignored when PAM is not available, by default None. |
None
|
Source code in src/opensatcom/antenna/pam.py
gain_dbi
¶
Return peak gain (analytic fallback).
Computes the antenna gain at the requested angular coordinates. In the current analytic-fallback mode the returned array is filled with the peak directivity for every direction; full pattern shaping is available when PAM is installed.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
theta_deg
|
ndarray
|
Elevation angles in degrees. The shape of the output matches this array. |
required |
phi_deg
|
ndarray
|
Azimuth angles in degrees. Must be broadcastable with
|
required |
f_hz
|
float
|
Operating frequency in hertz. |
required |
Returns:
| Type | Description |
|---|---|
ndarray
|
Gain values in dBi, with the same shape as |
Source code in src/opensatcom/antenna/pam.py
eirp_dbw
¶
EIRP = Ptx(dBW) + G(dBi).
Computes the Effective Isotropic Radiated Power by adding the transmit power (converted to dBW) and the antenna peak gain (dBi).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
theta_deg
|
float
|
Elevation angle 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
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
coupling_data
|
CouplingData
|
Coupling data loaded from an EdgeFEM artifact. |
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
|
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
|
Azimuth angles in degrees. |
required |
phi_deg
|
ndarray
|
Elevation 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
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 S-parameter matrix, shape (N_elem, N_elem)
|
|
element_patterns |
complex gain per element, shape (N_elem, N_theta, N_phi)
|
|
theta_grid_deg |
elevation angle grid, shape (N_theta,)
|
|
phi_grid_deg |
azimuth angle grid, shape (N_phi,)
|
|
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 an EdgeFEM artifact from a .npz file.
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
Source code in src/opensatcom/antenna/edgefem_loader.py
load_touchstone_coupling
¶
Load S-parameter coupling matrix from a Touchstone .sNp file.
Returns the coupling matrix at the first frequency point. Only the S-parameter matrix is extracted; element patterns must be provided separately (e.g., via .npz).
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
s_param_path
|
path to .sNp Touchstone file
|
|
required |
pattern_path
|
unused, reserved for future pattern file loading
|
|
None
|