From bcb48bae8f99286121b6de65bbc4fc718a72c14e Mon Sep 17 00:00:00 2001 From: Ryan Thompson Date: Mon, 1 May 2023 13:45:49 -0500 Subject: [PATCH] test: txrx_hwloop: fill prediction added --- .../test_timestamps/src/test_txrx_hwloop.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/host/libraries/libbladeRF_test/test_timestamps/src/test_txrx_hwloop.py b/host/libraries/libbladeRF_test/test_timestamps/src/test_txrx_hwloop.py index 6b1401c0..b9797fef 100644 --- a/host/libraries/libbladeRF_test/test_timestamps/src/test_txrx_hwloop.py +++ b/host/libraries/libbladeRF_test/test_timestamps/src/test_txrx_hwloop.py @@ -77,8 +77,14 @@ print("\nFalling Edge Results:") print(f" Average: {avg:.2f}") print(f" Variance: {var:.2f}") print(f" Std.Dev: {avg:.2f}") +print(f"\nPredicted Timestamp: {mode[0]:.2f} @ {mode_count[0]} periods") -print(f"\n Predicted Timestamp: {mode[0]:.2f} @ {mode_count[0]} occurrences") +fill = neg_edge_indexes - pos_edge_indexes +avg = np.average(fill) +var = np.var(fill) +dev = np.std(fill) +mode, mode_count = st.mode(fill) +print(f"Fill Prediction: {mode[0]:.2f} @ {mode_count[0]} rise/fall pairs") fig.subplots_adjust(hspace=0.5) print(f"\nPress [Escape] to close figure")