Skip to content

Commit 92410b9

Browse files
author
Joseph G. Shuttleworth
committed
Account for "QC_R_leftover" in passed_wells
1 parent cfc1c60 commit 92410b9

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

pcpostprocess/scripts/run_herg_qc.py

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

326+
# R_leftover only considered for protocols used for QC (i.e. staircase protocols)
327+
passed_QC_R_leftover = np.all(sub_df[sub_df.protocol.isin(args.D2SQC)]
328+
["R_leftover"].values
329+
)
330+
331+
logging.info(f"passed_QC_R_leftover {passed_QC_R_leftover}")
332+
333+
passed_QC_Erev_spread = E_rev_spread <= args.reversal_spread_threshold
334+
326335
qc_erev_spread[well] = passed_QC_Erev_spread
327336
erev_spreads[well] = E_rev_spread
328337

@@ -332,9 +341,9 @@ def main():
332341
was_selected = np.all(sub_df['selected'].values)
333342

334343
passed_qc = passed_qc3_bookend and was_selected\
335-
and passed_QC_Erev_all and passed_QC6_all\
336-
and passed_QC_Erev_spread and passed_QC1_all\
337-
and passed_QC4_all
344+
and passed_QC_Erev_all and passed_QC1_all\
345+
and passed_QC_Erev_spread and passed_QC4_all\
346+
and passed_QC6_all and passed_QC_R_leftover
338347

339348
passed_qc_dict[well] = passed_qc
340349

0 commit comments

Comments
 (0)