Skip to content
Snippets Groups Projects
Commit 7888edd2 authored by Eric Kooistra's avatar Eric Kooistra
Browse files

Print CW power.

parent b0b6e3d0
No related branches found
No related tags found
No related merge requests found
...@@ -89,6 +89,10 @@ SNR_adc_scale = SNR_adc - fraction * 20 * np.log10(2) ...@@ -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_away = 10*np.log10(A_away_cw / A_away_spurious)
SNR_even = 10*np.log10(A_even_cw / A_even_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 = %7.3f dB' % SNR_adc)
print('SNR_adc_scale = %7.3f dB' % SNR_adc_scale) print('SNR_adc_scale = %7.3f dB' % SNR_adc_scale)
print('SNR_away = %7.3f dB' % SNR_away) print('SNR_away = %7.3f dB' % SNR_away)
...@@ -97,7 +101,7 @@ print('SNR_even = %7.3f dB' % SNR_even) ...@@ -97,7 +101,7 @@ print('SNR_even = %7.3f dB' % SNR_even)
if useplot: if useplot:
# Plot sinus # Plot sinus
plt.figure(figNr) 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.xlabel('Time')
plt.ylabel('Voltage') plt.ylabel('Voltage')
plt.title('Sinus (%d values)' % N) plt.title('Sinus (%d values)' % N)
...@@ -106,7 +110,7 @@ if useplot: ...@@ -106,7 +110,7 @@ if useplot:
# Plot spectrum # Plot spectrum
plt.figure(figNr) 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.xlabel('Frequency')
plt.ylabel('Power') plt.ylabel('Power')
plt.title('Frequency (%d bins)' % (N/2)) plt.title('Frequency (%d bins)' % (N/2))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment