42 lines
956 B
Python
42 lines
956 B
Python
# apnea event type to number mapping
|
|
E2N = {
|
|
"Hypopnea": 1,
|
|
"Central apnea": 2,
|
|
"Obstructive apnea": 3,
|
|
"Mixed apnea": 4
|
|
}
|
|
|
|
N2Chn = {
|
|
1: "Rpeak",
|
|
2: "ECG_Sync",
|
|
3: "Effort Tho",
|
|
4: "Effort Abd",
|
|
5: "Flow P",
|
|
6: "Flow T",
|
|
7: "SpO2",
|
|
8: "5_class"
|
|
}
|
|
|
|
Stage2N = {
|
|
"W": 5,
|
|
"N1": 3,
|
|
"N2": 2,
|
|
"N3": 1,
|
|
"R": 4,
|
|
}
|
|
|
|
# 设定事件和其对应颜色
|
|
# event_code color event
|
|
# 0 黑色 背景
|
|
# 1 粉色 低通气
|
|
# 2 蓝色 中枢性
|
|
# 3 红色 阻塞型
|
|
# 4 灰色 混合型
|
|
# 5 绿色 血氧饱和度下降
|
|
# 6 橙色 大体动
|
|
# 7 橙色 小体动
|
|
# 8 橙色 深呼吸
|
|
# 9 橙色 脉冲体动
|
|
# 10 橙色 无效片段
|
|
ColorCycle = ["black", "pink", "blue", "red", "silver", "green", "orange", "orange", "orange", "orange",
|
|
"orange"] |