puncture_pattern#

sionna.phy.fec.turbo.utils.puncture_pattern(turbo_coderate: float, conv_coderate: float, device: str | None = None) torch.Tensor[source]#

Returns puncturing pattern such that the Turbo code has rate turbo_coderate given the underlying convolutional encoder is of rate conv_coderate.

Parameters:
  • turbo_coderate (float) – Desired coderate of the Turbo code.

  • conv_coderate (float) – Coderate of the underlying convolutional encoder. Currently, only rate=0.5 is supported.

  • device (str | None) – Device for the output tensor.

Outputs:

turbo_punct_pattern – 2D boolean tensor indicating the positions to be punctured.

Examples

from sionna.phy.fec.turbo import puncture_pattern

pattern = puncture_pattern(0.5, 0.5)
print(pattern)
# tensor([[ True,  True, False],
#         [ True, False,  True]])