检测图中的高振幅
我绘制了几个值,表示信号强度弱或高。我的问题是,我想统计评估开始和结束的 X 坐标。
我的问题是,这些高值蓝色幅度确实有很小的部分,其中Y 坐标低(如果我缩放)。因此,使用 10-20 个样本的平均值不会有帮助或不准确。我不确定哪种算法在这里有意义。视觉上我只想要黑线的开始值和结束值。
有什么聪明的方法可以做到这一点吗?这些值位于 CSV 中:
-0.00048828
0.00006104
-0.00024414
-0.00039673
-0.00109863
0.00286865
0.00527954
I plotted a couple of values, that represent a signal strength being weak or high. My problem is, that I want to statistically evaluate the start and end X-coordinate.
My issue with that is, that these high-valued blue amplitudes within do have little sections where the Y coordinate is low (if I zoom). So using an average value across 10-20 samples isn't going to be helpful or exact. I'm not sure which algorithm makes sense here. Visually I just want the start and the end value of the black line.
Is there some smart way to get that? The values are within a CSV:
-0.00048828
0.00006104
-0.00024414
-0.00039673
-0.00109863
0.00286865
0.00527954
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
您可以尝试用这样的方法过滤信号:
signal: s[i]
过滤后的信号 : f[i]
减少 coeff : c (选择 0 和 1 之间的值)
f[0] = s[0]
f[i ] = max(c * f[i-1], s[i])
此方法将在高振幅区域的末端引入偏差。您必须调整 c 才能获得具有预期精度的结果。如果 c 太低:您将对高频过于敏感,并且您将获得不需要的“孔”。如果c太高,则经过高幅度区域之后的滤波信号的下降将太慢。
对滤波后的信号应用阈值以获得限制。
You can try to filter the signal with something like this:
signal: s[i]
filtered signal : f[i]
decrease coeff : c (choose a value between 0 and 1)
f[0] = s[0]
f[i] = max(c * f[i-1], s[i])
This method will introduce a bias on the end of high-amplitude areas. You will have to tune c to get the result with the expected precision. If c is too low: you will be too sensitive to high frequencies, and you will obtain unwanted "holes". If c is too high, the decrease of the filtered signal after a high amplitude area will be too slow.
Apply a threshold on the filtered signal to get the limits.