@@ -457,7 +457,7 @@ def run(data_path, output_path, qc_map, wells=None,
457457
458458 qc_styled_df = create_qc_table (qc_df )
459459 logging .info (qc_styled_df )
460- qc_styled_df .to_excel (os .path .join (output_path , 'qc_table.xlsx' ))
460+ # qc_styled_df.to_excel(os.path.join(output_path, 'qc_table.xlsx'))
461461 qc_styled_df .to_latex (os .path .join (output_path , 'qc_table.tex' ))
462462
463463 # Save in csv format
@@ -821,7 +821,7 @@ def extract_protocol(readname, savename, time_strs, selected_wells, savedir,
821821 subtracted_trace , times , desc ,
822822 os .path .join (
823823 savedir , 'debug' , '-120mV time constant' ,
824- f'{ savename } -{ well } -sweep{ sweep } -time-constant-fit.pdf ' ),
824+ f'{ savename } -{ well } -sweep{ sweep } -time-constant-fit.png ' ),
825825 figure_size
826826 )
827827
@@ -1203,16 +1203,16 @@ def qc3_bookend(readname, savename, time_strs, wells, output_path,
12031203 return res_dict
12041204
12051205
1206- def get_time_constant_of_first_decay (trace , times , protocol_desc , output_path ,
1207- figure_size ):
1206+ def get_time_constant_of_first_decay (
1207+ trace , times , protocol_desc , output_path , figure_size ):
12081208 """
12091209 ???
12101210 """
1211- if output_path :
1212- if not os .path .exists (os .path .dirname (output_path )):
1213- os .makedirs (os .path .dirname (output_path ))
1211+ if not os .path .exists (os .path .dirname (output_path )):
1212+ os .makedirs (os .path .dirname (output_path ))
12141213
1215- first_120mV_step_index = [i for i , line in enumerate (protocol_desc ) if line [2 ] == 40 ][0 ] + 1
1214+ first_120mV_step_index = [
1215+ i for i , line in enumerate (protocol_desc ) if line [2 ] == 40 ][0 ] + 1
12161216
12171217 tstart , tend , vstart , vend = protocol_desc [first_120mV_step_index , :]
12181218 assert (vstart == vend )
@@ -1254,6 +1254,9 @@ def fit_func(x, args=None):
12541254 (1e-12 , 5e3 ),
12551255 ]
12561256
1257+ # TESTING ONLY
1258+ np .random .seed (1 )
1259+
12571260 # Repeat optimisation with different starting guesses
12581261 x0s = [[np .random .uniform (lower_b , upper_b ) for lower_b , upper_b in bounds ] for i in range (100 )]
12591262
0 commit comments