Skip to content

Commit

Permalink
improve nrChannelEstimate
Browse files Browse the repository at this point in the history
  • Loading branch information
catkira committed Oct 25, 2023
1 parent 93cf1a2 commit 1b33785
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions py3gpp/nrChannelEstimate.py
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,20 @@ def nrChannelEstimate(rxGrid=None, refInd=None, refSym=None, refGrid=None, carri

if True:
# this one works best!
interp_vertical = False
for col in range(N):
idx = np.where(np.logical_and(refInd >= col * K, refInd < (col + 1) * K))[0]
if len(idx) > 0:
sym_idx = refInd[idx] - col * K
H[:, col] = np.interp(np.arange(K), sym_idx, rxSym[idx] / refSym[idx])
else:
interp_vertical = True
if interp_vertical:
for row in range(K):
temp = H[row, :]
idx = np.where(temp != 0)[0]
H[row, :] = np.interp(np.arange(N), idx, temp[idx])


# estimate noise variance
mean = np.mean((np.abs(H[:, 1]), np.abs(H[:, 3])), axis=0)
Expand Down

0 comments on commit 1b33785

Please sign in to comment.