kaira.modulations.IdentityDemodulator

Inheritance diagram for IdentityDemodulator
- class kaira.modulations.IdentityDemodulator(*args, **kwargs)[source]
Bases:
BaseDemodulatorIdentity demodulator that passes input data through unchanged.
This demodulator implements the BaseDemodulator interface but doesn’t perform any actual demodulation. It’s useful as a no-op placeholder in pipelines or for testing.
- constellation
Trivial constellation points [0, 1]
- Type:
Methods
Initialize the identity demodulator.
Pass input symbols through unchanged.
Demodulate symbols to bits as required by BaseDemodulator.
Reset any stateful components.
Pass input symbols through unchanged, ignoring noise variance.
Attributes
Number of bits per symbol.
- __init__(*args, **kwargs)[source]
Initialize the identity demodulator.
- Parameters:
*args – Variable length argument list.
**kwargs – Arbitrary keyword arguments.
- forward(y: Tensor, noise_var=None, *args, **kwargs) Tensor[source]
Demodulate symbols to bits as required by BaseDemodulator.
- Parameters:
y – Received symbols with shape (…, N)
noise_var – Noise variance for soft demodulation (optional)
*args – Variable length argument list.
**kwargs – Arbitrary keyword arguments.
- Returns:
If noise_var is provided, returns soft values; otherwise, returns hard bit decisions
- demodulate(symbols: Tensor) Tensor[source]
Pass input symbols through unchanged.
- Parameters:
symbols – Input tensor with any shape
- Returns:
The same tensor, unchanged
- soft_demodulate(symbols: Tensor, noise_var: float) Tensor[source]
Pass input symbols through unchanged, ignoring noise variance.
For true soft demodulation, the implementation would calculate LLRs. This implementation simply returns the symbols unchanged.
- Parameters:
symbols – Input tensor with any shape
noise_var – Noise variance (ignored in this implementation)
- Returns:
The same tensor, unchanged