From 151cd0ac187670f7c94c60aadbef1980f07d13cd Mon Sep 17 00:00:00 2001 From: Deepanshi Date: Tue, 27 Feb 2024 13:15:42 -0500 Subject: [PATCH] ecg gen: shorter segments bug fix --- codes/ecg-image-generator/extract_leads.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/codes/ecg-image-generator/extract_leads.py b/codes/ecg-image-generator/extract_leads.py index 2c3abe7..6f17991 100644 --- a/codes/ecg-image-generator/extract_leads.py +++ b/codes/ecg-image-generator/extract_leads.py @@ -8,7 +8,7 @@ from matplotlib.ticker import AutoMinorLocator from TemplateFiles.generate_template import generate_template from math import ceil -from helper_functions import get_adc_gains,get_frequency,get_leads,load_recording,load_header,find_files, truncate_signal, create_signal_dictionary, samples_to_volts, standardize_leads +from helper_functions import get_adc_gains,get_frequency,get_leads,load_recording,load_header,find_files, truncate_signal, create_signal_dictionary, samples_to_volts, standardize_leads, write_wfdb_file from ecg_plot import ecg_plot import wfdb from PIL import Image, ImageDraw, ImageFont @@ -89,7 +89,7 @@ def get_paper_ecg(input_file,header_file,output_directory, seed, add_dc_pulse,ad frame = {} gain_index = 0 for key in record_dict: - if(len(record_dict[key][start:])