From 1843d63b66495a5d6c91f3247da149153b122be5 Mon Sep 17 00:00:00 2001 From: gac-x11ma Date: Thu, 30 Aug 2018 14:07:13 +0200 Subject: [PATCH] Script execution --- script/EnergyMultiScan.py | 27 +++++++++------------------ 1 file changed, 9 insertions(+), 18 deletions(-) diff --git a/script/EnergyMultiScan.py b/script/EnergyMultiScan.py index 4b48236..894c4a7 100644 --- a/script/EnergyMultiScan.py +++ b/script/EnergyMultiScan.py @@ -8,14 +8,14 @@ input_path = "/sls/X11MA/data/X11MA/Desktop/e17174/Sample01_Au_ref/"+file_prefi output_path = input_path #Parameters -#E1 = sys.arg[0] -#E2 = sys.arg[1] -#TIME = sys.arg[2] -#DELAY = sys.arg[3] -E1 = 801 -E2 = 810 -TIME = 1 -DELAY = 0 +E1 = sys.argv[0] +E2 = sys.argv[1] +TIME = sys.argv[2] +DELAY = sys.argv[3] +#E1 = 801 +#E2 = 810 +#TIME = 1 +#DELAY = 0 number_of_scans = 1 ID1=0 ID2=1 @@ -93,16 +93,7 @@ def _startPlot(type): except: pass print "Done Plotting" - """ - output_file_TEY = output_path+"TEY_"+file_prefix+"_" + suffix + ".dat" - TEYout = open(output_file_TEY, "w+") - sTEY = sep.join(str(x) for x in TEY) #+ line_sep # MCP1.write("%s" + sep % i) - sTEYout = sep + "rbkenergy" + sep + "ID1_en" + sep + "ID2_en" + sep + "TEY_norm" + sep + "Keithley1" + sep + "Keithley2" + sep + "Keithley3"+ sep + "Polarisation"+ sep + "Keithley1raw" + sep + "Keithley2raw" + sep + "Keithley3raw" - sTEYout = sTEYout + sTEY - TEYout.write(sTEYout) - TEYout.close() - print "Saved TEY signal data" - """ + def startPlot(type = 1): global task task = fork((_startPlot,(type,)),)