Skip to content

Commit

Permalink
nonnegativity check
Browse files Browse the repository at this point in the history
  • Loading branch information
i-jey committed Apr 11, 2024
1 parent 1e95e09 commit 32df2f7
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions stats_utils/compensator.py
Original file line number Diff line number Diff line change
Expand Up @@ -206,6 +206,10 @@ def get_95_bound_and_compensation_from_parasitemia(
True to return parasitemia in parasitemia/uL
False to return parasitemia in % (default)
"""

if raw_parasitemia < 0:
raw_parasitemia = 0

if units_ul_in:
raw_parasitemia /= PARASITES_P_UL_PER_PERCENT

Expand Down

0 comments on commit 32df2f7

Please sign in to comment.