From bed653fa0e9e269eee45ce191e9f41e7c884d272 Mon Sep 17 00:00:00 2001 From: Jono Targett Date: Wed, 29 May 2024 22:07:16 +0930 Subject: [PATCH] Fixed some print statements --- scripts/selcal-detect.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/scripts/selcal-detect.py b/scripts/selcal-detect.py index bcfafc8..bb8bc43 100755 --- a/scripts/selcal-detect.py +++ b/scripts/selcal-detect.py @@ -18,13 +18,12 @@ if __name__ == '__main__': if len(data.shape) == 2: data = data.mean(axis=1) - # Normalise - print(np.max(data)) + # Coarse normalisation data = data / np.max(data) # TODO JMT: Find out why the correlation step fails when max frequency <= 2 * nyquist rate data, sample_rate, decimation = anti_alias(data, sample_rate, 4800) - print(f'Length after decimation: {len(data)} samples (/{decimation}, {sample_rate})') + print(f'Length after decimation: {len(data)} samples (/{decimation}, {sample_rate} Hz)') pure_signals = {tone:note(freq, pure_sample_length, rate=sample_rate) for tone,freq in TONES.items()} correlations = {tone:np.abs(signal.correlate(data, pure, mode='same')) for tone,pure in pure_signals.items()}