updated so fine scan takes input of coarse scan and you don't need to close the eog window in the middle of the run

This commit is contained in:
Beale John Henry
2023-07-11 16:40:26 +02:00
parent 03e9e0e462
commit d58f148e3c

View File

@@ -394,7 +394,6 @@ def scrub_scan( scan_top_dir, scan ):
min_alpha_clen, min_beta_clen, min_gamma_clen, min_c_clen, min_alpha_val, min_beta_val, min_gamma_val, min_c_val = find_clen_values(stats_df) min_alpha_clen, min_beta_clen, min_gamma_clen, min_c_clen, min_alpha_val, min_beta_val, min_gamma_val, min_c_val = find_clen_values(stats_df)
# print suggested clen # print suggested clen
if scan == "fine":
suggested_clen = (min_alpha_clen + min_beta_clen + min_gamma_clen )/3 suggested_clen = (min_alpha_clen + min_beta_clen + min_gamma_clen )/3
suggested_clen = round(suggested_clen, 4) suggested_clen = round(suggested_clen, 4)
print ("The suggested clen = {0}".format(suggested_clen)) print ("The suggested clen = {0}".format(suggested_clen))
@@ -409,7 +408,8 @@ def scrub_scan( scan_top_dir, scan ):
fig.tight_layout() fig.tight_layout()
plt.savefig("{0}.png".format(scan)) plt.savefig("{0}.png".format(scan))
plt.show()
return suggested_clen
def main( cwd, lst, sample, geom, centre_clen, cell_file ): def main( cwd, lst, sample, geom, centre_clen, cell_file ):
@@ -417,13 +417,14 @@ def main( cwd, lst, sample, geom, centre_clen, cell_file ):
scan( cwd, lst, sample, geom, centre_clen, cell_file, step_size="coarse" ) scan( cwd, lst, sample, geom, centre_clen, cell_file, step_size="coarse" )
scrub_scan( top_dir_coarse, scan="coarse" ) suggested_clen = scrub_scan( top_dir_coarse, scan="coarse" )
top_dir_fine = "{0}/fine".format( cwd ) top_dir_fine = "{0}/fine".format( cwd )
scan( cwd, lst, sample, geom, centre_clen, cell_file, step_size="fine" ) scan( cwd, lst, sample, geom, suggested_clen, cell_file, step_size="fine" )
scrub_scan( top_dir_fine, scan="fine" ) scrub_scan( top_dir_fine, scan="fine" )
plt.show()
if __name__ == "__main__": if __name__ == "__main__":
parser = argparse.ArgumentParser() parser = argparse.ArgumentParser()