alphanumericslab / ecg-image-kit

A toolkit for analysis, synthesis, and digitization of electrocardiogram images
BSD 3-Clause "New" or "Revised" License
36 stars 23 forks source link

Default values for some parameters of the function get_paper_ecg are not correct. #5

Closed wenh06 closed 8 months ago

wenh06 commented 8 months ago

The function get_paper_ecg has some incorrect default values for some of the parameters:

add_dc_pulse, add_bw, show_grid, add_print have boolean default values True, but in the following code

    for i in range(len(ecg_frame)):
        dc = add_dc_pulse.rvs()
        bw = add_bw.rvs()
        grid = show_grid.rvs()
        print_txt = add_print.rvs()

they should be some scipy distributions.

standard_colours has default value True, which would result in KeyError: 'colourTrue' in the ecg_plot since True > 0 is True in the following code:

    elif(standard_colours > 0):
        random_colour_index = standard_colours
        color_major = standard_major_colors['colour'+str(random_colour_index)]
        color_minor = standard_minor_colors['colour'+str(random_colour_index)]
deepanshi-s commented 8 months ago

Changed default values.

rsameni commented 8 months ago

Good catch! Thank you Wen.