From c7409bc96dea7008e130af8fd81d8ea2368650c6 Mon Sep 17 00:00:00 2001 From: Deepanshi Date: Wed, 10 Jul 2024 20:37:25 -0400 Subject: [PATCH] ecg gen: bug fix --- codes/ecg-image-generator/ecg_plot.py | 2 +- codes/ecg-image-generator/gen_ecg_image_from_data.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/codes/ecg-image-generator/ecg_plot.py b/codes/ecg-image-generator/ecg_plot.py index 2c2c54b..28fb3c8 100644 --- a/codes/ecg-image-generator/ecg_plot.py +++ b/codes/ecg-image-generator/ecg_plot.py @@ -362,7 +362,7 @@ def ecg_plot( if columns > 1 and (i+1)%columns != 0: sep_x = [len(ecg[leadName])*step + x_offset + dc_offset + x_gap] * round(8*y_grid_dots) sep_x = np.array(sep_x) - sep_y = np.linspace(y_offset - 4*y_grid_dots*step, y_offset + 4*y_grid_dots*step, len(sep_x)) + sep_y = np.linspace(y_offset - 4*y_grid_dots*0.002, y_offset + 4*y_grid_dots*0.002, len(sep_x)) ax.plot(sep_x, sep_y, linewidth=line_width * 3, color=color_line) #Plotting longest lead for 12 seconds diff --git a/codes/ecg-image-generator/gen_ecg_image_from_data.py b/codes/ecg-image-generator/gen_ecg_image_from_data.py index 805ce9a..2cb0e9f 100644 --- a/codes/ecg-image-generator/gen_ecg_image_from_data.py +++ b/codes/ecg-image-generator/gen_ecg_image_from_data.py @@ -59,7 +59,7 @@ def get_parser(): parser.add_argument('--random_bw',type=float,default=0) parser.add_argument('--remove_lead_names',action="store_false",default=True) parser.add_argument('--lead_name_bbox',action="store_true",default=False) - parser.add_argument('--store_config', type=int, const=1, default=0) + parser.add_argument('--store_config', type=int, nargs='?', const=1, default=0) parser.add_argument('--deterministic_offset',action="store_true",default=False) parser.add_argument('--deterministic_num_words',action="store_true",default=False)