Registry Module

The registry module provides a registry system for managing communication modes and performance data.

exception spacelink.phy.registry.DuplicateRegistryEntryError[source]

Bases: Exception

Raised when duplicate entries are found during registry loading.

exception spacelink.phy.registry.NoRegistryFilesError[source]

Bases: Exception

Raised when no YAML files are found in the specified directories.

class spacelink.phy.registry.Registry[source]

Bases: object

Registry of link modes and their performance.

__init__()[source]

Create an empty registry.

load(mode_dir=PosixPath('/home/runner/work/spacelink/spacelink/src/spacelink/phy/data/modes'), perf_dir=PosixPath('/home/runner/work/spacelink/spacelink/src/spacelink/phy/data/perf'))[source]

Load link modes and performance data from files.

Parameters:
  • mode_dir (Path) – Path to the directory containing the link mode files.

  • perf_dir (Path | None, optional) – Path to the directory containing the performance data. If None, no performance data will be loaded.

Raises:
Return type:

None

get_performance_curve(mode_id, metric)[source]

Get performance curve data for a mode.

Parameters:
  • mode_id (str) – ID of the link mode.

  • metric (ErrorMetric) – Error metric.

Returns:

Performance curve object with multiple data points for interpolation.

Return type:

ModePerformanceCurve

Raises:

KeyError – If no curve data is available for the specified mode and metric.

get_performance_threshold(mode_id, metric)[source]

Get performance threshold data for a mode.

Parameters:
  • mode_id (str) – ID of the link mode.

  • metric (ErrorMetric) – Error metric.

Returns:

Performance threshold object with single quasi-error-free operating point.

Return type:

ModePerformanceThreshold

Raises:

KeyError – If no threshold data is available for the specified mode and metric.

get_performance(mode_id, metric)[source]

Get performance curve data for a mode.

Deprecated since version 0.2.0: Use get_performance_curve() or get_performance_threshold() instead. This method only returns curve data and will raise KeyError for threshold data.

Parameters:
  • mode_id (str) – ID of the link mode.

  • metric (ErrorMetric) – Error metric.

Returns:

Performance curve object.

Return type:

ModePerformanceCurve

Raises:

KeyError – If no curve data is available for the specified mode and metric.