pam_gray#
- sionna.phy.mapping.pam_gray(b: numpy.ndarray) int[source]#
Maps a vector of bits to a PAM constellation point with Gray labeling.
This recursive function maps a binary vector to Gray-labelled PAM constellation points. It can be used to generate QAM constellations. The constellation is not normalized.
- Parameters:
b (numpy.ndarray) – Array with binary entries of shape [n].
- Outputs:
point – int. PAM constellation point taking values in \(\{\pm 1,\pm 3,\dots,\pm (2^n-1)\}\).
Notes
This algorithm is a recursive implementation of the expressions found in Section 5.1 of [3GPPTS38211]. It is used in the 5G standard.
Examples
import numpy as np from sionna.phy.mapping import pam_gray b = np.array([1, 0]) print(pam_gray(b)) # -1