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

ecg-image-generator: dc_offset not added to leadName text, causing lead names not aligning with signals anymore. #13

Closed felixkrones closed 5 months ago

felixkrones commented 5 months ago

Dear team,

I hope you are doing well. I noticed that when adding a dc_offset in ecg_plot.py, this offset is not added to the lead name text x-value, causing a miss-alignment. I am not sure if this is on purpose or should be corrected.

I think it could be corrected by changing x_offset + x_gap to x_offset + x_gap + dc_offset

https://github.com/alphanumericslab/ecg-image-kit/blob/918b29e7bc5c8693b2a6bca6362f1332793d1ea1/codes/ecg-image-generator/ecg_plot.py#L274

deepanshi-s commented 5 months ago

HI @felixkrones Thank you for pointing that out! Code has been updated to shift the lead names based on the dc offset.