-
Notifications
You must be signed in to change notification settings - Fork 341
Open
Description
figure 1 is hp.process() function
图1是hp.process()函数处理后的图表
wd, m = hp.process(self.healthMapList, self.sampleRate,clean_rr=True,clean_rr_method='z-score')
pfig = hp.plotter(wd, m,figsize=(20, 4),show=False)
pfig.subplots_adjust(**{"left":0.026,"bottom":0.07,"right":1,"top":1})
pfig.legend(prop={'family':'LXGW WenKai Mono','weight':'normal','size':12},framealpha=0.5)
plt.xlim(0,rrtime/1000+rrtime/1000000)
figure 2 is partial enlarged figure1
图2是局部放大的图1
figure 3 is Distribution of R-R interval (ibi) in time
图3是R-R间期(心跳间隔 Inter-Beat Interval IBI)在时间上的分布
wd, m = hp.process(self.healthMapList, self.sampleRate,clean_rr=True,clean_rr_method='z-score')
# rrwd = hp.clean_rr_intervals(working_data=wd)
rrfig = plt.figure('R-R与时间散点图',figsize=(20, 4))
rrfig.subplots_adjust(**{"left":0.026,"bottom":0.07,"right":1,"top":1})
rrlist,rrtimelist,rrtime = list(),list(),0
for ids in range(len(wd['RR_list'])):
rrtime += wd['RR_list'][ids]
if not wd['RR_masklist'][ids]:
rrlist.append(wd['RR_list'][ids])
rrtimelist.append(rrtime/1000)
print("正在绘制R-R与时间散点图中...")
plt.scatter(rrtimelist,rrlist,alpha=0.7,color='#8a68d0',s=5)
plt.plot(range(len(rrlist)),[sum(rrlist)/len(rrlist)]*len(rrlist),label=f"Avg R-R: {sum(rrlist)/len(rrlist)} ms",linestyle='--',alpha=0.5,linewidth=1,color='#CC0000')
plt.ylabel("ms")
plt.xlim(0,rrtime/1000+rrtime/1000000)
plt.legend(prop={'family':'LXGW WenKai Mono','weight':'normal','size':12},framealpha=0.5)
figure 4 is hp.plot_poincare() function.
图4是hp.plot_poincare()函数直接生成
with open(f'./{self.filename}/庞加莱散点图.txt','w') as f:
f.write("%s\n%s"%(str(wd).replace(', ',',\n'),str(m).replace(', ',',\n')))
ppfig = hp.plot_poincare(wd, m,figsize=(10,10),show=False)
ppfig.subplots_adjust(**{"left":0.06,"bottom":0.045,"right":1,"top":0.97})
ppfig.savefig(f'./{self.filename}/庞加莱散点图.png')
Can abnormal T waves be filtered?
能否过滤异常T波?
Metadata
Metadata
Assignees
Labels
No labels