Link Budgets – ephemerista.analysis.link_budget¶
The link_budget.py module.
This module provides the LinkBudget class and the associated LinkBudgetResults class.
- class ephemerista.analysis.link_budget.EnvironmentalLosses(*, rainAttenuation, gaseousAttenuation, scintillationAttenuation, atmosphericAttenuation, cloudAttenuation, depolarizationLoss)¶
The EnvironmentalLosses class.
This class models all environmental losses supported by Ephemerista.
- classmethod calculate(percentage_exceed, time, observer, target_comms, observer_comms, gs_pass, min_elevation_deg=5.0)¶
Calculate environmental losses for a given link.
The losses are computed based on ITU-R recommendations using the ìtur library.
- Parameters:
percentage_exceed (
float) – Percentage of time losses are exceededtime (
Time) – Time at which to calculate lossesobserver (
Asset) – Observer asset (typically ground station)target_comms (
CommunicationSystem) – Target communication systemobserver_comms (
CommunicationSystem) – Observer communication systemgs_pass (
Pass) – Pass object for elevation datamin_elevation_deg (
float) – Minimum elevation (degrees) below which the threshold value is used. ITU-R models become numerically unstable below ~5 degrees. Default is 5.0.
- Returns:
Calculated environmental losses for the link
- Return type:
Self
- classmethod calculate_for_elevations(percentage_exceed, elevations_deg, observer, target_comms, observer_comms, min_elevation_deg=5.0)¶
Calculate environmental losses of one link for several elevations at once.
Apart from the elevation, every input of the ITU-R models is the same along a link, so they are evaluated once for all elevations. This is much faster than one call per elevation and gives the same values.
- Parameters:
percentage_exceed (
float) – Percentage of time losses are exceededelevations_deg (
list[float]) – Elevations of the target seen from the observer, in degreesobserver (
Asset) – Observer asset (typically ground station)target_comms (
CommunicationSystem) – Target communication systemobserver_comms (
CommunicationSystem) – Observer communication systemmin_elevation_deg (
float) – Minimum elevation (degrees) below which the threshold value is used. ITU-R models become numerically unstable below ~5 degrees. Default is 5.0.
- Returns:
Calculated environmental losses, one for each elevation
- Return type:
list[Self]
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- classmethod no_losses()¶
Initialize all environmental losses to zero.
- Returns:
Instance with all loss components set to zero.
- Return type:
Self
- sum()¶
Sum all environmental losses.
- Returns:
Total environmental losses in dB.
- Return type:
float
- class ephemerista.analysis.link_budget.InterferenceStats(*, interferencePowerW, cN0I0, ebN0I0, marginWithInterference)¶
The InterferenceStats class.
This class models the influence of interfering radio transmissions on the link.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ephemerista.analysis.link_budget.Link(*, window, linkType, times, stats)¶
The Link class.
This class models a radio link between two communication systems covering a specific visbility window.
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- plot(*, plot_interference=False)¶
Plot all link properties.
- Parameters:
plot_interference (
bool) – Whether to include interference statistics in the plots. Default is False.- Returns:
Figure containing subplots of all link properties.
- Return type:
matplotlib.figure.Figure
- plot_attenuations(percentage_exceed)¶
Plot all environmental attenuations.
- Parameters:
percentage_exceed (
float) – Percentage of time the attenuations are exceeded, used in plot title.- Returns:
Figure containing subplots of all environmental attenuations.
- Return type:
matplotlib.figure.Figure
- to_dataframe()¶
Convert link statistics to a pandas DataFrame.
- Returns:
DataFrame containing all link statistics indexed by time.
- Return type:
DataFrame
- class ephemerista.analysis.link_budget.LinkBudget(*, scenario, startTime=None, endTime=None, percentageExceed=1.0, minElevationDeg=5.0, withEnvironmentalLosses=True, withInterference=False)¶
The LinkBudget analysis.
- analyze(ensemble=None, visibility=None)¶
Run the link budget analysis.
- Parameters:
ensemble (
Ensemble|None) – Pre-computed ensemble with propagated trajectories. If None, the scenario will be propagated automatically.visibility (
VisibilityResults|None) – Pre-computed visibility results. If None, visibility analysis will be run automatically.
- Returns:
Complete link budget analysis results including all links and their statistics over time.
- Return type:
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class ephemerista.analysis.link_budget.LinkBudgetResults(*, type='link_budget', links)¶
The results of the LinkBudget analysis.
- get(observer, target)¶
Get all links for a given observer and target pairing.
- Return type:
list[Link]
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- to_dataframe(observer, target, *, with_interference=False)¶
Convert the analysis results to a Pandas data frame.
- Parameters:
- Returns:
Dataframe containing link statistics for all passes between the observer and target.
- Return type:
DataFrame
- class ephemerista.analysis.link_budget.LinkStats(*, slantRange, fspl, txAngle, rxAngle, eirp, gt, cN0, ebN0, margin, losses, carrierRxPower, dataRate, bandwidth, frequency, noisePower, interferenceStats=None)¶
The LinkStats class.
This class models all relevant properties of a radio link for link budget calculations at specific point in time.
- add_interference(interference_power_w)¶
Add interference to previously computed link statistics.
- Parameters:
interference_power_w (
float) – Total interference power in Watts- Returns:
Updated link statistics including interference effects
- Return type:
Self
- as_flatten_dict()¶
Convert the link stats to a flattened dictionary.
The resultant dict is the same as if it were created by Pydantic’s model_dump, but the parameters that have internal structure are flattened following these rules: - tx_angle and rx_angle just use their internal degrees parameter. - losses and interference_stats are flattened, with their parameters added to the top level.
- Return type:
dict[str,float]
- classmethod calculate(time, channel, link_type, target, observer, target_comms, observer_comms, losses, ensemble)¶
Calculate link statistics for a given time and link configuration.
- Parameters:
time (
Time) – Time at which to calculate link statisticschannel (
Channel) – Communication channel configurationlink_type (
Literal['uplink','downlink']) – Type of link directiontarget (
Asset) – Target asset (typically spacecraft)observer (
Asset) – Observer asset (typically ground station)target_comms (
CommunicationSystem) – Target communication systemobserver_comms (
CommunicationSystem) – Observer communication systemlosses (
EnvironmentalLosses) – Environmental losses to applyensemble (
Ensemble) – Ensemble containing propagated trajectories
- Returns:
Calculated link statistics including EIRP, G/T, margins, etc.
- Return type:
Self
- model_config: ClassVar[ConfigDict] = {'alias_generator': <function to_camel>, 'populate_by_name': True}¶
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].