Closedown

This commit is contained in:
gac-x11ma
2018-09-04 20:27:29 +02:00
parent 47f3ff3f0e
commit ae91d1639d

View File

@@ -66,15 +66,14 @@ def convert_file(input_file_name, output_file_name):
with open(input_file_name) as inp:
lines = inp.readlines()
with open(output_file_name, "wb") as out:
out.write("Energy" + sep + "Io" + sep + "CADC2" + sep + "CADC3" + sep + "Mag" + 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(" ")
field = caget('X11MA-XMCD:Ireadout')
out.write(Ecrbk + s + CADC1 + s + CADC2 + s + CADC3 + s + field + line_sep)
(Ecrbk,CADC1, CADC2, NORM, CADC3, CADC4, MCurr, cffrbk, ID1Erbk, ID2Erbk, vTime) = line.split(" ")
out.write(Ecrbk + s + CADC1 + s + CADC2 + s + CADC3 + line_sep)
except:
traceback.print_exc()