Mode Module

The mode module provides modulation and coding scheme definitions for space communications systems.

class spacelink.phy.mode.Modulation(**data)[source]

Bases: BaseModel

Represents 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: BaseModel

Represents a single forward error correction code.

Parameters:
  • name (str) – Name of the code.

  • rate (Fraction) – Code rate.

  • interleaver_depth (int | None) – Interleaver depth for codes such as Reed Solomon that are commonly paired with an interleaver.

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: BaseModel

Represents a chain of forward error correction codes.

This provides the flexibility to handle concatenated codes such as Reed Solomon paired with convolutional code but also single codes and even the absence of forward error correction.

Parameters:

codes (list[Code]) – List of codes in in encoding order from outermost to innermost code. If no error correction is used the list will be empty.

codes: list[Code]
property rate: Fraction

The overall code rate of the chain, which is the product of the individual code rates or 1 if no error correction is used.

Returns:

Code rate.

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: BaseModel

Represents a specific combination of modulation and coding.

Parameters:
  • id (str) – Unique identifier for the link mode.

  • modulation (Modulation) – Modulation scheme.

  • coding (CodeChain) – Forward error correction code chain.

  • ref (str, optional) – Reference or source of the mode definition.

id: str
modulation: Modulation
coding: CodeChain
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].