display FFT data (2)

pull/52/head
Zilog80 2020-08-15 20:05:50 +02:00
rodzic bf572f1b91
commit 0c4eca2ed2
1 zmienionych plików z 9 dodań i 1 usunięć

Wyświetl plik

@ -23,10 +23,18 @@ data = np.genfromtxt( fft_file, delimiter=';', names=['fq','db'] , skip_header=1
fq = data['fq']
db = data['db']
N = len(db)
m = np.mean(db)
db5 = np.full(N, m)
for n in range(2, N-2):
db5[n] = (db[n-2]+db[n-1]+db[n]+db[n+1]+db[n+2])/5.0
ax1 = plt.subplot(111)
ax1.set_xlim(fq[0], fq[-1])
ax1.plot( fq, db, color='b', linewidth=0.2, label='fft')
ax1.plot( fq, db, color='b', linewidth=0.06, label='fft')
ax1.plot( fq, db5, color='g', linewidth=0.4, label='fft')
plt.show()