Skip to content

Commit

Permalink
fix nrSymbolDemodulate
Browse files Browse the repository at this point in the history
  • Loading branch information
catkira committed Oct 29, 2023
1 parent fdad89e commit 3292a67
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions py3gpp/nrSymbolDemodulate.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,15 +39,15 @@ def nrSymbolDemodulate(input, mod, nVar=1e-10, DecisionType="soft"):
elif mod == "QPSK":
output = np.append(output, np.real(symbol))
output = np.append(output, np.imag(symbol))
elif mod == "QAM16":
elif mod == "16QAM":
output = np.append(output, np.real(symbol))
output = np.append(output, np.imag(symbol))
output = np.append(output, -(np.abs(np.real(symbol)) - 2 / np.sqrt(10)))
output = np.append(output, -(np.abs(np.imag(symbol)) - 2 / np.sqrt(10)))

if DecisionType == "soft":
output /= nVar / np.exp(1)
if mod == "QAM16":
if mod == "16QAM":
output /= 2
else:
output = (output > 0).astype(int)
Expand Down

0 comments on commit 3292a67

Please sign in to comment.