From 334440602f4935d4e12f46a5c1274325d84ec933 Mon Sep 17 00:00:00 2001 From: gac-x11ma Date: Thu, 14 Dec 2017 14:37:39 +0100 Subject: [PATCH] Script execution --- script/Electric_field_loop3.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/script/Electric_field_loop3.py b/script/Electric_field_loop3.py index f3f54e1..109b610 100644 --- a/script/Electric_field_loop3.py +++ b/script/Electric_field_loop3.py @@ -21,9 +21,10 @@ E1 = 779.3 # Edge #E2 = 770 #preedge # Voltage/magnetic field setting -Max = 10.0; +Max = 20.0; Min=-Max; -No_of_steps = 20; +No_of_steps = 2 +00; step_size = float(Max/No_of_steps); Noavg = 3; N_loops = 2; @@ -56,15 +57,14 @@ file_prefix = time.strftime("%Y%m%d") fid = get_next_fid(output_path, "me" + file_prefix) suffix = ("%03d" % fid) output_file = output_path + "me" + file_prefix + "_" + suffix + "_scan_" -print "output_file = ", output_file +#print "output_file = ", output_file -for k in range(0,20): +for k in range(0,21): print "Setting field = ", k*Min/20 caput("X11MA-XMCD:I-SETraw", k*Min/20) - sleep(0.3); + sleep(0.1); for k in range(0,len(loops)): - #filename=open(output_file + "_" + k + ".dat","a") filename=open(output_file + str(k)+".dat","a") for i in range(0,len(forward)): print "Setting field = ", forward[i] @@ -111,7 +111,7 @@ for k in range(0,len(loops)): filename.write("%f %f %e %e %s \n" %(forward[i], E1, ADC2_E1, tey_norm_E1, detector4)); filename.close(); -for k in range(0,20): +for k in range(0,21): print "Setting field = ", (20-k)*Min/20 caput("X11MA-XMCD:I-SETraw", (20-k)*Min/20) sleep(0.1); @@ -124,6 +124,6 @@ close_vg13() set_preference(Preference.ENABLED_PLOTS, ['forward', 'tey_norm']) set_preference(Preference.PLOT_TYPES, {'tey_norm':1}) -print "Data saved in data "+output_file + "_" + "xxx" + ".dat"+"" +print "Data saved in data "+output_file + "xxx" + ".dat"+"" \ No newline at end of file