[英]Denoising very noisy and large oscilloscope data
I have UHF data with 100 million data points and a broad band of background noise (about 5 mV). 我有1亿个数据点的UHF数据和较宽的背景噪声(约5 mV)。 Is there a way to filter that noise out?
有没有办法滤除这种噪音? Due to there being so many data points every filter function I try to implement just smoothes the data lines including the noise.
由于每个滤波器功能都有很多数据点,因此我尝试实现的目的只是使包括噪声在内的数据线变得平滑。 The result is that you cannot see any filter effect if you are zoomed out.
结果是,如果缩小将看不到任何滤镜效果。
Filter Example: 过滤器示例:
b, a = scipy.signal.butter(15, 0.1)
y = scipy.signal.filtfilt(b,a, df[1].values)
df2 = pd.DataFrame(y, index=df.index)
Unfortunately I do not know how to provide you with the high quality data that is shown to me while plt.show()
. 不幸的是,我不知道如何为您提供
plt.show()
显示给我的高质量数据。 There I can zoom to every data point. 在那里,我可以缩放到每个数据点。 When I save the plot to an image, quality drops to 600 or so dpi.
当将图保存到图像时,质量下降到600 dpi左右。
UHF file: https://ufile.io/hhkeg UHF文件: https : //ufile.io/hhkeg
Code: 码:
import matplotlib.pyplot as plt
import pandas as pd
import readTrc
from scipy import signal
datX, datY, m = readTrc.readTrc('C220180104_ch2_UHF00000.trc')
#100mil data points
srx, sry = pd.Series(datX * 1000), pd.Series(datY * 1000)
df = pd.concat([srx, sry], axis = 1)
df.set_index(0, inplace = True)
b, a = signal.butter(15, 0.1)
y = signal.filtfilt(b,a, df[1].values)
df2 = pd.DataFrame(y, index=df.index)
#Plot Impulse
if max(datX) < 0.01:
df2.plot(grid = 1,
linewidth = 0.5,
figsize = (9,5),
legend = False,
xlim = (df.index[0], df.index[-1]))
else:
df2.plot(grid = 1,
linewidth = 1,
figsize = (9,5),
legend = False,
xlim = (df.index[0], df.index[-1]))
plt.xlabel('Zeit in ms')
plt.ylabel('UHF-Signal in mV')
##plt.savefig('UHF_plot.png', dpi = 600)
plt.show()
print('done')
Without Filter: 没有过滤器:
With Filter: 带过滤器:
There is really not much use out of that. 确实没有太多用处。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.