Fixed some print statements
This commit is contained in:
parent
cd83d1683b
commit
bed653fa0e
@ -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()}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user