Registry Module
The registry module provides a registry system for managing communication modes and performance data.
- exception spacelink.phy.registry.DuplicateRegistryEntryError[source]
Bases:
ExceptionRaised when duplicate entries are found during registry loading.
- exception spacelink.phy.registry.NoRegistryFilesError[source]
Bases:
ExceptionRaised when no YAML files are found in the specified directories.
- class spacelink.phy.registry.Registry[source]
Bases:
objectRegistry of link modes and their performance.
- 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:
DuplicateRegistryEntryError – If duplicate entries are found during loading.
NoRegistryFilesError – If no YAML files are found in the specified directories.
- 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:
- 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:
- 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()orget_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:
- Raises:
KeyError – If no curve data is available for the specified mode and metric.