Interference Analysis¶
- class missiontools.comm.InterferenceAnalysis(f_MHz)[source]¶
Bases:
objectAnalyze interference risk between space networks.
- add_victim_tx(name, antenna, tx_psd, condition=None)[source]¶
- Parameters:
name (str)
antenna (AbstractAntenna)
tx_psd (float)
condition (AbstractCondition | None)
- Return type:
None
- add_victim_rx(name, antenna, condition=None)[source]¶
- Parameters:
name (str)
antenna (AbstractAntenna)
condition (AbstractCondition | None)
- Return type:
None
- add_interfering_tx(name, antenna, tx_psd, condition=None)[source]¶
- Parameters:
name (str)
antenna (AbstractAntenna)
tx_psd (float)
condition (AbstractCondition | None)
- Return type:
None
- compute(psd_threshold, start_time, end_time, max_step=10.0, event_step=1.0)[source]¶
Compute interference events.
- Parameters:
psd_threshold (
float) – Interference PSD threshold in dBW/Hz.start_time (
array_likeofdatetime64) – Start of the analysis window.end_time (
array_likeofdatetime64) – End of the analysis window.max_step (
float, optional) – Coarse scan step for access interval detection in seconds. Default 10.0.event_step (
float, optional) – Sampling step within candidate intervals in seconds. Default 1.0.
- Returns:
events (
list[dict]) – Each dict represents an interference event with keys:victim_tx,victim_rx,interfering_tx(str),start_time,end_time(datetime64),max_interferer_psd(float, dBW/Hz),times(ndarray of datetime64),interferer_psd,victim_psd(ndarray, dBW/Hz).access_totals (
dict[str,dict[str,float]]) – Nested dictionary of total pairwise condition-filtered access times in seconds. Index asaccess_totals[victim_tx_name][victim_rx_name]. Access intervals are filtered by the conditions applied to the victim transmitter and receiver.
- Parameters:
- Return type:
- interference_percentage(psd_threshold, victim_tx, victim_rx, interfering_tx)[source]¶
Compute interference percentage from the last
compute()results.Interference percentage is defined as:
100.0 * T_interf / T_access
where T_interf is the total time (in seconds) during which the received interferer PSD at victim_rx is at or above psd_threshold while at least one specified victim_tx and at least one specified interfering_tx are visible (condition-filtered), and T_access is the total condition-filtered time that at least one specified victim_tx is visible to victim_rx.
- Parameters:
psd_threshold (
floatorlist[float]orarray_like) – Interference PSD threshold(s) in dBW/Hz. All values must be greater than or equal to the threshold passed to the most recentcompute()call. When an array is provided, an array of percentages is returned (one per threshold), suitable for generating cumulative interference plots.victim_tx (
strorlist[str]orarray_like) – Name(s) of the victim transmitter(s) to include.victim_rx (
str) – Name of the single victim receiver.interfering_tx (
strorlist[str]orarray_like) – Name(s) of the interfering transmitter(s) to include.
- Returns:
floatorndarray– Interference percentage(s) in the range [0, 100]. Returns a scalarfloatwhen psd_threshold is a scalar, or anndarraywhen psd_threshold is a sequence. Returns 0.0 (or an array of zeros) when the denominator (total access time) is zero.- Raises:
RuntimeError – If
compute()has not been run or its results have been invalidated.ValueError – If any psd_threshold value is less than the threshold used in the most recent
compute()call.KeyError – If a specified transmitter or receiver name is not found in the cached results.
- Parameters:
- Return type: