Skip to content

Commit

Permalink
Add unit tests for shifted Zadoff-Chu
Browse files Browse the repository at this point in the history
  • Loading branch information
mhostetter committed Aug 3, 2023
1 parent e2d47e8 commit 3371cb1
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions tests/sequences/test_zadoff_chu.py
Original file line number Diff line number Diff line change
Expand Up @@ -314,3 +314,13 @@ def test_25_11():
]
)
np.testing.assert_array_almost_equal(seq, seq_truth)


def test_shift():
x = sdr.zadoff_chu(13, 3)
x_shift = sdr.zadoff_chu(13, 3, shift=1)

# The shifted version should be a cyclic shift of the original sequence multiplied by a complex value
y = np.roll(x, -1) / x_shift
y /= y[0]
np.testing.assert_array_almost_equal(y, 1)

0 comments on commit 3371cb1

Please sign in to comment.