kaira.modulations.IdentityDemodulator

Inheritance diagram of IdentityDemodulator

Inheritance diagram for IdentityDemodulator

class kaira.modulations.IdentityDemodulator(*args, **kwargs)[source]

Bases: BaseDemodulator

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

torch.Tensor

Methods

__init__

Initialize the identity demodulator.

demodulate

Pass input symbols through unchanged.

forward

Demodulate symbols to bits as required by BaseDemodulator.

reset_state

Reset any stateful components.

soft_demodulate

Pass input symbols through unchanged, ignoring noise variance.

Attributes

bits_per_symbol

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

property bits_per_symbol: int

Number of bits per symbol.

reset_state() None

Reset any stateful components.

For demodulators with memory.