From 1699caab52def54c2947c5e78eaeecb549980107 Mon Sep 17 00:00:00 2001 From: Josh Bailey Date: Sun, 3 Mar 2024 18:55:12 +0000 Subject: [PATCH] Use uniform random complex test data. --- tests/test_offline_consistent.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/test_offline_consistent.sh b/tests/test_offline_consistent.sh index 0bcd087d..783b5ea7 100755 --- a/tests/test_offline_consistent.sh +++ b/tests/test_offline_consistent.sh @@ -7,7 +7,7 @@ TESTFILE=gamutrf_recording_ettus__gain40_1_10000000Hz_1024000sps.s16 rm -rf "$TMPDIR/input" mkdir "$TMPDIR/input" export FULLTMP=$TMPDIR/input/$TESTFILE -python -c "import numpy ; numpy.random.uniform(-16384,16383,(20480000,)).astype(numpy.int16).tofile(\"$FULLTMP\")" +python -c "import numpy as np ; x = (np.random.uniform(-16384,16383,(20480000,)) + 1.j * np.random.uniform(-16384,16383,(20480000,))).tobytes() ; np.frombuffer(x, np.float64).astype(np.int16).tofile(\"$FULLTMP\")" rm -rf "$TMPDIR/ref" mkdir "$TMPDIR/ref"