Interference Analysis

class missiontools.comm.InterferenceAnalysis(f_MHz)[source]

Bases: object

Analyze interference risk between space networks.

Parameters:

f_MHz (float) – Centre frequency of the channel in MHz.

Parameters:

f_MHz (float)

add_victim_tx(name, antenna, tx_psd, condition=None)[source]
Parameters:
Return type:

None

add_victim_rx(name, antenna, condition=None)[source]
Parameters:
Return type:

None

add_interfering_tx(name, antenna, tx_psd, condition=None)[source]
Parameters:
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_like of datetime64) – Start of the analysis window.

  • end_time (array_like of datetime64) – 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 as access_totals[victim_tx_name][victim_rx_name]. Access intervals are filtered by the conditions applied to the victim transmitter and receiver.

Parameters:
  • psd_threshold (float)

  • start_time (ArrayLike)

  • end_time (ArrayLike)

  • max_step (float)

  • event_step (float)

Return type:

tuple[list[dict], dict[str, dict[str, float]]]

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 (float or list[float] or array_like) – Interference PSD threshold(s) in dBW/Hz. All values must be greater than or equal to the threshold passed to the most recent compute() call. When an array is provided, an array of percentages is returned (one per threshold), suitable for generating cumulative interference plots.

  • victim_tx (str or list[str] or array_like) – Name(s) of the victim transmitter(s) to include.

  • victim_rx (str) – Name of the single victim receiver.

  • interfering_tx (str or list[str] or array_like) – Name(s) of the interfering transmitter(s) to include.

Returns:

float or ndarray – Interference percentage(s) in the range [0, 100]. Returns a scalar float when psd_threshold is a scalar, or an ndarray when 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:

float | ndarray[tuple[Any, …], dtype[floating]]