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_coderategiven the underlying convolutional encoder is of rateconv_coderate.- Parameters:
- 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]])