diff --git a/libraries/base/common/python/try_round.py b/libraries/base/common/python/try_round.py index bf284b5d8c13e8aa3762ca2754f4eb1b285608b2..9748ae0250d0198d6f704a80f66bafe1db76496a 100755 --- a/libraries/base/common/python/try_round.py +++ b/libraries/base/common/python/try_round.py @@ -89,6 +89,10 @@ SNR_adc_scale = SNR_adc - fraction * 20 * np.log10(2) SNR_away = 10*np.log10(A_away_cw / A_away_spurious) SNR_even = 10*np.log10(A_even_cw / A_even_spurious) +print('A_adc_cw = %7.3f dBW' % (10*np.log10(A_adc_cw))) +print('A_away_cw = %7.3f dBW' % (10*np.log10(A_away_cw))) +print('A_even_cw = %7.3f dBW' % (10*np.log10(A_even_cw))) +print('') print('SNR_adc = %7.3f dB' % SNR_adc) print('SNR_adc_scale = %7.3f dB' % SNR_adc_scale) print('SNR_away = %7.3f dB' % SNR_away) @@ -97,7 +101,7 @@ print('SNR_even = %7.3f dB' % SNR_even) if useplot: # Plot sinus plt.figure(figNr) - plt.plot(t, a_adc, '-r', t, a_away, '.-g', t, a_even, '.b') + plt.plot(t, a_adc, '-r', t, a_away, '.-g', t, a_even, '.-b') plt.xlabel('Time') plt.ylabel('Voltage') plt.title('Sinus (%d values)' % N) @@ -106,7 +110,7 @@ if useplot: # Plot spectrum plt.figure(figNr) - plt.plot(f, A_adc, '-r', f, A_away, '.-g', f, A_even, '.b') + plt.plot(f, A_adc, '-r', f, A_away, '.-g', f, A_even, '.-b') plt.xlabel('Frequency') plt.ylabel('Power') plt.title('Frequency (%d bins)' % (N/2))