MIT-LCP / MIT-LCP/physionet

Bug in epicmp

Open Beginner friendly
#47 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
82
Forks
21
Avg merge
35m
Merged PRs (30d)
1

Description

There is a small bug in the current implementation of epicmp (Last revision 9 May 2010), particulary in the validation of episodes of atrial fibrillation when the '-x' flag is set in order to exclude episodes of atrial flutter.

Specifically, the bug is at line 208, when the duration is modified to exclude the overlap with an atrial flutter episode. By the condition evaluated at line 198, ex_end[i] is guaranteed to be greater than ep_start[a], so the quantity on the right side of the assignment is always negative, and therefore the duration is increased rather than decreased. The bug is solved by simply changing the order of the operands, so the line 208 should look as follows:

duration -= ex_end[i] - ep_start[a];

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in epicmp at line 208 and read the surrounding validation logic for the -x flag, including the condition at line 198. Verify that overlap with an atrial flutter episode reduces the atrial fibrillation duration rather than increasing it; the issue is done when this validation behaves correctly.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
cli
Issue type
Bug
Difficulty
1/5
Estimated time
Under an hour
Activity status
Stale
Clarity
Clearly specified
Newbie friendliness
65/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.