Mode Module
The mode module provides modulation and coding scheme definitions for space communications systems.
- class spacelink.phy.mode.Modulation(**data)[source]
Bases:
BaseModelRepresents a single modulation scheme.
- Parameters:
name (str) – Name of the modulation scheme.
bits_per_symbol (int) – Number of bits per symbol.
-
name:
str
-
bits_per_symbol:
int
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class spacelink.phy.mode.Code(**data)[source]
Bases:
BaseModelRepresents a single PHY layer component that adds overhead.
This class is primarily used for forward error correction codes, but can also represent other PHY layer components that add overhead such as framing structures (e.g., DVB-S2 PLFRAME and BBFRAME).
- Parameters:
name (str) – Name of the code or PHY layer component.
rate (Fraction) – Code rate or efficiency representing the ratio of information bits to total bits.
interleaver_depth (int | None) – Interleaver depth for codes such as Reed Solomon that are commonly paired with an interleaver. May be None if not applicable.
-
name:
str
-
rate:
Fraction
-
interleaver_depth:
Optional[int]
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class spacelink.phy.mode.CodeChain(**data)[source]
Bases:
BaseModelRepresents a chain of PHY layer components that add overhead.
This provides the flexibility to handle concatenated codes such as Reed Solomon paired with convolutional code, framing structures (e.g., DVB-S2 PLFRAME and BBFRAME), single codes, and even the absence of forward error correction.
- Parameters:
codes (list[Code]) – List of codes or PHY layer components in encoding order from outermost to innermost. If no overhead-adding components are used, the list will be empty.
- property rate: Fraction
The overall rate of the chain, which is the product of the individual rates.
This represents the cumulative efficiency of all PHY layer components, accounting for overhead from FEC codes, framing structures, and other components. If no overhead-adding components are present, the rate is 1.
- Returns:
Overall rate of the chain.
- Return type:
Fraction
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].
- class spacelink.phy.mode.LinkMode(**data)[source]
Bases:
BaseModelRepresents a specific combination of modulation and coding.
- Parameters:
id (str) – Unique identifier for the link mode.
modulation (Modulation) – Modulation scheme.
coding (CodeChain) – Chain of PHY layer components that add overhead (FEC codes, framing, etc.).
ref (str, optional) – Reference or source of the mode definition.
-
id:
str
-
modulation:
Modulation
-
ref:
str
- property info_bits_per_symbol: Fraction
- property channel_bits_per_symbol: int
- info_bit_rate(symbol_rate_hz)[source]
Calculate the information bit rate as a function of the symbol rate.
The information bit rate refers to the rate of information bits, which are the input to the first stage of the encoding chain on the transmit end of the link or the output of the last decoding stage on the receive end of the link. This is sometimes referred to as the “net bit rate.”
- Parameters:
symbol_rate_hz (Frequency) – Symbol rate.
- Returns:
Bit rate in Hertz.
- Return type:
Frequency
- symbol_rate(info_bit_rate)[source]
Calculate the symbol rate as a function of the information bit rate.
- Parameters:
info_bit_rate (Frequency) – Information bit rate.
- Returns:
Symbol rate in Hertz.
- Return type:
Frequency
- model_config: ClassVar[ConfigDict] = {}
Configuration for the model, should be a dictionary conforming to [ConfigDict][pydantic.config.ConfigDict].