kaira.modulations.PSKDemodulator

Inheritance diagram for PSKDemodulator
- class kaira.modulations.PSKDemodulator(order: Literal[4, 8, 16, 32, 64] = 4, gray_coding: bool = True, *args, **kwargs)[source]
Bases:
BaseDemodulatorGeneral M-ary Phase-Shift Keying (PSK) demodulator.
Demodulates complex constellation points back to bits.
Methods
Initialize the PSK demodulator.
Demodulate PSK symbols.
Reset any stateful components.
Attributes
Number of bits per symbol.
- __init__(order: Literal[4, 8, 16, 32, 64] = 4, gray_coding: bool = True, *args, **kwargs) None[source]
Initialize the PSK demodulator.
- Parameters:
order – Modulation order (must be a power of 2)
gray_coding – Whether Gray coding was used for constellation mapping
*args – Variable length argument list.
**kwargs – Arbitrary keyword arguments.
- forward(y: Tensor, noise_var: float | Tensor | None = None, *args, **kwargs) Tensor[source]
Demodulate PSK symbols.
- Parameters:
y – Received tensor of PSK symbols
noise_var – Noise variance for soft demodulation (optional)
*args – Variable length argument list.
**kwargs – Arbitrary keyword arguments.
- Returns:
If noise_var is provided, returns LLRs; otherwise, returns hard bit decisions