DataPrepare/event_mask_process/SHHS1_process.py

43 lines
847 B
Python

import sys
from pathlib import Path
sys.path.append(str(Path(__file__).resolve().parent.parent))
project_root_path = Path(__file__).resolve().parent.parent
import shutil
import draw_tools
import utils
import numpy as np
import signal_method
import os
import mne
from tqdm import tqdm
import xml.etree.ElementTree as ET
import re
# 获取分期和事件标签,以及不可用区间
def process_one_signal(samp_id, show=False):
if __name__ == '__main__':
yaml_path = project_root_path / "dataset_config/SHHS1_config.yaml"
conf = utils.load_dataset_conf(yaml_path)
root_path = Path(conf["root_path"])
save_path = Path(conf["mask_save_path"])
print(f"root_path: {root_path}")
print(f"save_path: {save_path}")
org_signal_root_path = root_path / "OrgBCG_Aligned"
label_root_path = root_path / "Label"