diff --git a/script/EnergyMultiScan.py b/script/EnergyMultiScan.py index 009df2e..3acaad5 100644 --- a/script/EnergyMultiScan.py +++ b/script/EnergyMultiScan.py @@ -1,6 +1,6 @@ file_prefix = time.strftime("%Y%m%d") # CHANGE THE PATH IN THE OTH -input_path = "/sls/X11MA/data/X11MA/Desktop/e17174/Sample01_Au_ref/"+file_prefix+"/" +input_path = "/sls/X11MA/data/e17174/Data1/Aug_2018/Sample01_Au_ref/"+file_prefix+"/" output_path = input_path diff --git a/script/local.py b/script/local.py index 9ec69e2..c177304 100644 --- a/script/local.py +++ b/script/local.py @@ -60,21 +60,20 @@ def wait_channel(name, value, timeout =None, type='s'): cawait(name, value, timeout = timeout, type=type) print "Done" -def convert_file(input_file_name, output_file_name, field = 0, pol = 0, keithley_3 = False): +def convert_file(input_file_name, output_file_name): sep = "\t" line_sep = "\r\n" with open(input_file_name) as inp: lines = inp.readlines() with open(output_file_name, "wb") as out: - out.write("Energy" + sep + "rbkenergy" + sep + "Mag" + sep + "Pol" + sep + "Io" + sep + "CADC2" + sep + "Norm/CADC3" + line_sep) + out.write("Energy" + sep + "Io" + sep + "CADC2" + sep + "CADC3" + line_sep) s = sep + " " #File format has a space before numeric values for line in lines[1:]: line = line.strip() if line=="": break try: (Ecrbk,CADC1, CADC2, NORM, CADC3, CADC4, MCurr, cffrbk, ID1Erbk, ID2Erbk, vTime) = line.split(" ") - #out.write(Ecrbk + sep + Ecrbk + sep + str(field) + sep + str(pol) + sep + CADC1 + sep + CADC2 + sep + (CADC3 if keithley_3 else NORM) + line_sep) - out.write(Ecrbk + s + str(field) + s + str(pol) + s + CADC1 + s + CADC2 + s + (CADC3 if keithley_3 else NORM) + line_sep) + out.write(Ecrbk + s + CADC1 + s + CADC2 + s + CADC3 + line_sep) except: traceback.print_exc()