Skip to content

Commit 0f31894

Browse files
Merge pull request #93 from CardiacModelling/js_fix_passed_wells
Account for "QC_R_leftover" in passed_wells
2 parents 3053872 + e298a70 commit 0f31894

File tree

1 file changed

+12
-3
lines changed

1 file changed

+12
-3
lines changed

pcpostprocess/scripts/run_herg_qc.py

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -314,6 +314,15 @@ def main():
314314
passed_QC_Erev_spread = E_rev_spread <= args.reversal_spread_threshold
315315
logging.info(f"passed_QC_Erev_spread {passed_QC_Erev_spread}")
316316

317+
# R_leftover only considered for protocols used for QC (i.e. staircase protocols)
318+
passed_QC_R_leftover = np.all(sub_df[sub_df.protocol.isin(args.D2SQC.values())]
319+
["R_leftover"].values
320+
)
321+
322+
logging.info(f"passed_QC_R_leftover {passed_QC_R_leftover}")
323+
324+
passed_QC_Erev_spread = E_rev_spread <= args.reversal_spread_threshold
325+
317326
qc_erev_spread[well] = passed_QC_Erev_spread
318327
erev_spreads[well] = E_rev_spread
319328

@@ -323,9 +332,9 @@ def main():
323332
was_selected = np.all(sub_df['selected'].values)
324333

325334
passed_qc = passed_qc3_bookend and was_selected\
326-
and passed_QC_Erev_all and passed_QC6_all\
327-
and passed_QC_Erev_spread and passed_QC1_all\
328-
and passed_QC4_all
335+
and passed_QC_Erev_all and passed_QC1_all\
336+
and passed_QC_Erev_spread and passed_QC4_all\
337+
and passed_QC6_all and passed_QC_R_leftover
329338

330339
passed_qc_dict[well] = passed_qc
331340

0 commit comments

Comments
 (0)