|
4 | 4 | # |
5 | 5 | import argparse |
6 | 6 | import importlib.util |
7 | | -import json |
8 | 7 | import logging |
9 | 8 | import multiprocessing |
10 | 9 | import os |
11 | 10 | import re |
12 | 11 | import string |
13 | 12 | import sys |
14 | 13 |
|
15 | | -import matplotlib |
16 | 14 | import matplotlib.pyplot as plt |
17 | 15 | import numpy as np |
18 | 16 | import pandas as pd |
@@ -414,7 +412,7 @@ def run(data_path, output_path, save_id, staircase_protocols, |
414 | 412 |
|
415 | 413 | # Store the results by adding an extra column to qc_df |
416 | 414 | qc_df['qc3.bookend'] = [qc3_bookend_dict[well] for well in qc_df.well] |
417 | | - del(qc3_bookend_dict) |
| 415 | + del qc3_bookend_dict |
418 | 416 |
|
419 | 417 | # |
420 | 418 | # Write a file chrono.txt containing the order that protocols were run in |
@@ -459,7 +457,7 @@ def run(data_path, output_path, save_id, staircase_protocols, |
459 | 457 | # QC Erev spread: check spread in reversal potential isn't too large |
460 | 458 | E_revs = sub_df['E_rev'].values.flatten().astype(np.float64) |
461 | 459 | E_rev_spread = E_revs.max() - E_revs.min() |
462 | | - del(E_revs) |
| 460 | + del E_revs |
463 | 461 | passed_QC_Erev_spread = E_rev_spread <= reversal_spread_threshold |
464 | 462 | logging.info(f'passed_QC_Erev_spread {passed_QC_Erev_spread}') |
465 | 463 | erev_spreads[well] = E_rev_spread |
@@ -614,8 +612,8 @@ def agg_func(x): |
614 | 612 |
|
615 | 613 |
|
616 | 614 | def run_secondary_qc(readname, savename, time_strs, selected_wells, savedir, |
617 | | - data_path, figure_size, reversal_potential, save_id, |
618 | | - write_traces): |
| 615 | + data_path, figure_size, reversal_potential, save_id, |
| 616 | + write_traces): |
619 | 617 | """ |
620 | 618 | Performs QC on a protocol (staircase or other), and exports the traces. |
621 | 619 |
|
@@ -705,7 +703,7 @@ def run_secondary_qc(readname, savename, time_strs, selected_wells, savedir, |
705 | 703 | np.vstack((times, voltages)).T, columns=['time', 'voltage']) |
706 | 704 | voltage_df.to_csv(os.path.join( |
707 | 705 | trace_dir, f'{save_id}-{savename}-voltages.csv')) |
708 | | - #write_csv(times, trace_dir, f'{save_id}-{savename}-times.csv') |
| 706 | + # write_csv(times, trace_dir, f'{save_id}-{savename}-times.csv') |
709 | 707 |
|
710 | 708 | qc_before = before_trace.get_onboard_QC_values() |
711 | 709 | qc_after = after_trace.get_onboard_QC_values() |
|
0 commit comments