Skip to content

Commit

Permalink
Make CountCorrector an ABC
Browse files Browse the repository at this point in the history
  • Loading branch information
mwlkhoo committed Nov 25, 2024
1 parent 3d0c042 commit 3a17077
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion stats_utils/corrector.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
from stats_utils.constants RBCS_P_UL


class CountCorrector:
class CountCorrector(ABC):
def __init__(
self,
inv_cmatrix: npt.NDArray,
Expand All @@ -35,6 +35,13 @@ def __init__(
self.rbc_ids = rbc_ids
self.parasite_ids = parasite_ids

@abstractmethod
def get_res_from_counts(self, raw_counts: npt.NDArray, units_ul_out: bool = False
) -> Tuple[float, float]:

@abstractmethod
def calc_parasitemia(self, counts: npt.NDArray) -> float:

def _correct_counts(self, raw_counts: npt.NDArray):
"""
Correct raw counts using transformation matrix
Expand Down

0 comments on commit 3a17077

Please sign in to comment.