Precoding Configuration¶
- class Precoder[source]¶
Bases:
ABC
Abstract base class for signal processing algorithms operating on complex data symbols streams.
A symbol precoder represents one coding step of a full symbol precoding configuration. It features the encoding and decoding routines, meant to encode and decode multidimensional symbol streams during transmission and reception, respectively.
- abstract property num_input_streams: int¶
Required number of input symbol streams for encoding / number of resulting output streams after decoding.
- Returns:
The number of symbol streams.
- Return type:
- abstract property num_output_streams: int¶
Required number of input symbol streams for decoding / number of resulting output streams after encoding.
- Returns:
The number of symbol streams.
- Return type:
- property precoding: Precoding | None¶
Access the precoding configuration this precoder is attached to.
- Returns:
Handle to the precoding. None if the precoder is considered floating.
- Raises:
RuntimeError – If this precoder is currently floating.
- property rate: Fraction¶
Rate between input symbol slots and output symbol slots.
For example, a rate of one indicates that no symbols are getting added or removed during precoding.
- Returns:
The precoding rate.
- Return type:
Fraction
- property required_num_input_streams: int¶
Number of input streams required by the precoding configuration.
- Returns:
Required number of input streams.
- Return type:
- Raises:
RuntimeError – If precoder is not attached to a precoding configuration.
- property required_num_output_streams: int¶
Number of output streams required by the precoding configuration.
- Returns:
Required number of output streams.
- Return type:
- Raises:
RuntimeError – If precoder is not attached to a precoding configuration.
- class Precoding(modem=None)[source]¶
Bases:
Sequence
,Serializable
,Generic
[PrecoderType
]Channel Precoding configuration for wireless transmission of modulated data symbols.
Symbol precoding may occur as an intermediate step between bit-mapping and base-band symbol modulations. In order to account for the possibility of multiple antenna data-streams, waveform generators may access the Precoding configuration to encode one-dimensional symbol streams into multi-dimensional symbol streams during transmission and subsequently decode during reception.
- __modem¶
Communication modem (transmitter or receiver) this precoding configuration is attached to.
- Type:
Optional[Modem]
- __precoders¶
List of individual precoding steps. The full precoding results from a sequential execution of each precoding step.
- Type:
List[Precoder]
Symbol Precoding object initialization.
- Parameters:
modem (Modem, Optional) – The modem this Precoding configuration is attached to.
- classmethod from_yaml(constructor, node)[source]¶
Recall a new Precoding instance from YAML.
- Parameters:
constructor (SafeConstructor) – A handle to the constructor extracting the YAML information.
node (Node) – YAML node representing the Precoding serialization.
- Returns:
Newly created Precoding instance.
- Return type:
- pop_precoder(index)[source]¶
Remove a precoder from the processing chain.
Returns: Handle to the removed precoder.
- required_inputs(precoder)[source]¶
Query the number input streams of a given precoder within a receiver.
- Parameters:
precoder (Precoder) – Handle to the precoder in question.
- Returns:
Number of streams
- Return type:
- Raises:
ValueError – If the precoder is not registered with this configuration.
- required_outputs(precoder)[source]¶
Query the number output streams of a given precoder within a transmitter.
- Parameters:
precoder (Precoder) – Handle to the precoder in question.
- Returns:
Number of streams
- Return type:
- Raises:
ValueError – If the precoder is not registered with this configuration.
- classmethod to_yaml(representer, node)[source]¶
Serialize a Precoding configuration to YAML.
- Parameters:
representer (SafeRepresenter) – A handle to a representer used to generate valid YAML code. The representer gets passed down the serialization tree to each node.
node (Precoding) – The Precoding instance to be serialized.
- Returns:
The serialized YAML node. None if the object state is default.
- Return type:
Node
- property modem: BaseModem | None¶
Access the modem this Precoding configuration is attached to.
Returns: Handle to the modem object.
- property num_input_streams: int¶
Number of input streams required to perform the precoding.
Returns: The number of inputs.