1 Star 0 Fork 0

FanCaoming/clock_prediction

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
plot.py 828 Bytes
一键复制 编辑 原始数据 按行查看 历史
FanCaoming 提交于 2023-08-16 17:06 . 误差检测,鲁棒性提升
import matplotlib.pyplot as plt
clock_offset = []
with open('PPSCtlOut.dat') as f1:
while True:
line = f1.readline()
if not line:
break
val = float(line.split()[2])
clock_offset.append(val)
n = len(clock_offset)
clock_offset_diff = []
for i in range(10, n-10):
clock_offset_diff.append(clock_offset[i]-clock_offset[i-1])
#
clock_offset2 = []
with open('PPSCtlOut2.dat') as f2:
while True:
line = f2.readline()
if not line:
break
val = float(line.split()[1])
clock_offset2.append(val)
n = len(clock_offset2)
clock_offset_diff2 = []
for i in range(10, n-10):
clock_offset_diff2.append(clock_offset2[i]-clock_offset2[i-1])
plt.figure(1)
plt.plot(clock_offset_diff)
plt.figure(2)
plt.plot(clock_offset_diff2)
plt.show()
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/fancaoming/clock_prediction.git
git@gitee.com:fancaoming/clock_prediction.git
fancaoming
clock_prediction
clock_prediction
master

搜索帮助