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:
@@ -394,10 +394,9 @@ 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)
|
||||
|
||||
# print suggested clen
|
||||
if scan == "fine":
|
||||
suggested_clen = (min_alpha_clen + min_beta_clen + min_gamma_clen )/3
|
||||
suggested_clen = round(suggested_clen, 4)
|
||||
print ("The suggested clen = {0}".format(suggested_clen))
|
||||
suggested_clen = (min_alpha_clen + min_beta_clen + min_gamma_clen )/3
|
||||
suggested_clen = round(suggested_clen, 4)
|
||||
print ("The suggested clen = {0}".format(suggested_clen))
|
||||
|
||||
# plot results
|
||||
fig, (ax1, ax3) = plt.subplots(1, 2)
|
||||
@@ -409,7 +408,8 @@ def scrub_scan( scan_top_dir, scan ):
|
||||
|
||||
fig.tight_layout()
|
||||
plt.savefig("{0}.png".format(scan))
|
||||
plt.show()
|
||||
|
||||
return suggested_clen
|
||||
|
||||
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" )
|
||||
|
||||
scrub_scan( top_dir_coarse, scan="coarse" )
|
||||
suggested_clen = scrub_scan( top_dir_coarse, scan="coarse" )
|
||||
|
||||
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" )
|
||||
plt.show()
|
||||
|
||||
if __name__ == "__main__":
|
||||
parser = argparse.ArgumentParser()
|
||||
|
||||
Reference in New Issue
Block a user