Skip to content

Identify abnormally elevated T waves as R waves #108

@Ginsakura

Description

@Ginsakura

心电合法性检测
局部放大
RR-Time散点图
庞加莱散点图

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

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions