kopia lustrzana https://github.com/rs1729/RS
display FFT data (2)
rodzic
bf572f1b91
commit
0c4eca2ed2
|
@ -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()
|
||||
|
||||
|
|
Ładowanie…
Reference in New Issue