Skip to content

Commit

Permalink
Merge pull request #7 from czbiohub-sf/no-negativity
Browse files Browse the repository at this point in the history
set cov b to 0 too
  • Loading branch information
mwlkhoo authored Sep 25, 2024
2 parents acdd399 + c692b24 commit 9787e96
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion stats_utils/compensator.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,7 +78,9 @@ def __init__(

m, b, cov_m, cov_b = self._get_fit_metrics(compensation_csv_dir)
# ignore negative b
b = 0.0 if b < 0 else b
if b < 0:
b = 0
cov_b = 0

inv_cmatrix = self._get_matrix(m, b)
inv_cmatrix_std = self._get_matrix_std(cov_m, cov_b)
Expand Down

0 comments on commit 9787e96

Please sign in to comment.