kaira.modulations.DPSKDemodulator

Inheritance diagram for DPSKDemodulator
- class kaira.modulations.DPSKDemodulator(order: Literal[2, 4, 8, 16] | None = None, gray_coding: bool = True, bits_per_symbol: int | None = None, gray_coded: bool | None = None, *args, **kwargs)[source]
Bases:
BaseDemodulatorDifferential Phase-Shift Keying (DPSK) demodulator.
Methods
Initialize the DPSK demodulator.
Demodulate DPSK symbols.
Reset any stateful components.
Attributes
Number of bits per symbol.
- __init__(order: Literal[2, 4, 8, 16] | None = None, gray_coding: bool = True, bits_per_symbol: int | None = None, gray_coded: bool | None = None, *args, **kwargs) None[source]
Initialize the DPSK demodulator.
- Parameters:
order – Modulation order (must be a power of 2)
gray_coding – Whether Gray coding was used for phase mapping
bits_per_symbol – Alternative way to specify order (2^bits_per_symbol)
gray_coded – Alternative name for gray_coding
*args – Variable length argument list.
**kwargs – Arbitrary keyword arguments.
- forward(y: Tensor, noise_var: float | Tensor | None = None, *args, **kwargs) Tensor[source]
Demodulate DPSK symbols.
- Parameters:
y – Received tensor of DPSK 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 LLRs; otherwise, returns hard bit decisions with shape (…, (N-1)*bits_per_symbol) because first symbol is reference