diff --git a/script/local.py b/script/local.py index 9fdc3cf..e8b1a70 100644 --- a/script/local.py +++ b/script/local.py @@ -28,6 +28,7 @@ VG12_SET = "X11MA-EPS-VG12:SET" VG12_GET = "X11MA-OP-VG12:OPEN" VG13_SET = "X11MA-EPS-VG13:SET" VG13_GET = "X11MA-OP-VG13:OPEN" +MAG ="X11MA-XMCD:Ireadout """ LPP_DELAY = "X11MA-ES2-4CHT:SET2-DELAY" LPP_FINE_DELAY = "X11MA-ES2-4CHT:SET2-FINE" @@ -36,7 +37,7 @@ TIME_DELAY_VAL = "X11MA-ES2:Theta-Cur.VAL" TIME_DELAY_START = "X11MA-ES2:SCAN-START" TIME_DELAY_COMPLETE = "X11MA-ES2-scan1.SMSG" TBT_MAG = "X11MA-LSCI632:MFIELD" -MAG="X11MA-XMCD:Ireadout" +" """ def get_next_fid(folder, prefix): try: @@ -166,8 +167,8 @@ def convert_file(input_file_name, output_file_name, pol = None): lines = inp.readlines() with open(output_file_name, "wb") as out: (db, st) = ("java.lang.Double", "java.lang.String") - out.write("#Energy" + sep + "CADC1" + sep + "CADC2" + sep + "CADC3" + sep + "NORMtey" + "Pol" + line_sep) - out.write("#"+ db + sep + db + sep + db + sep + db + sep + db + line_sep) + out.write("#Energy" + sep + "CADC1" + sep + "CADC2" + sep + "CADC3" + sep + "NORMtey" + "Pol" + sep + "X" + sep + "Y" + "Z" + "THT" + "Mag" + line_sep) + out.write("#"+ db + sep + db + sep + db + sep + db + sep + db + sep + db + sep + db + sep + db + sep + db + sep + db +line_sep) s = sep for line in lines[1:]: line = line.strip() @@ -176,7 +177,8 @@ def convert_file(input_file_name, output_file_name, pol = None): (Ecrbk, CADC1, CADC2, CADC3, CADC4, MCurr, cffrbk, IDErbk, time) = line.split(" ") normtey=repr( float(CADC2)/float(CADC1)) # normdiode=repr(float(CADC3)/float(CADC2)) - out.write(Ecrbk + s + CADC1 + s + CADC2 + s + CADC3 + s + normtey + s + str(pol) + line_sep) + mag=caget(MAG) + out.write(Ecrbk + s + CADC1 + s + CADC2 + s + CADC3 + s + normtey + s + str(pol) + s + mag + line_sep) except: traceback.print_exc() os.rename(input_file_name, get_context().setup.expandPath("{data}/OTF/" + ntpath.basename(input_file_name)))