Closedown

This commit is contained in:
x07maop
2016-03-30 11:48:43 +02:00
parent 204bf32d80
commit 8e092e66da
4 changed files with 10 additions and 12 deletions

View File

@@ -37,10 +37,10 @@ if MODE is not None:
if MODE == 'LINEAR':
if ALPHA is not None:
pol_angle.write(ALPHA) #TODO: CAPUT
#pol_done.waitValue("DONE") #TODO: NEEDED?
wait_device(pol_done, "DONE") #TODO: NEEDED?
if OFFSET is not None:
pol_offset.write(OFFSET) #TODO: CAPUT
#pol_done.waitValue("DONE")
wait_device(pol_done, "DONE")
caput('E1', E1)
caput('E2', E2)

View File

@@ -47,8 +47,8 @@ if abs(field.readback.read() - START_FIELD) > FIELD_PRECISION:
field.write(START_FIELD)
field_done.waitValue(1) #ramp_done.wait_for_value(1.0)
pol_done.waitValue("DONE")
wait_device(field_done, 1) #ramp_done.wait_for_value(1.0)
wait_device(pol_done, "DONE")
open(2.0)

View File

@@ -44,9 +44,8 @@ for (START_FIELD, END_FIELD, RAMP_RATE) in RANGES:
if abs(field.readback.read() - START_FIELD) > FIELD_PRECISION:
field.write(START_FIELD)
field_done.waitValue(1) #ramp_done.wait_for_value(1.0)
pol_done.waitValue("DONE")
wait_device(field_done, 1) #ramp_done.wait_for_value(1.0)
wait_device(pol_done, "DONE")
open(2.0)

View File

@@ -111,13 +111,12 @@ def wait_device(dev, value, timeout=-1):
print "Done waiting"
def convert_file(input_file_name, output_file_name):
def convert_file(input_file_name, output_file_name, mode):
print "Converting data file: " + input_file_name + " to " + output_file_name
sep = "\t"
line_sep = "\n"
pol= pol_mode.readback.read()
if ret == "LINEAR": pol = str(pol_angle.read())
pol = str(pol_angle.read() if (MODE == "LINEAR") else pol_mode.readback.read())
with open(input_file_name) as inp:
lines = inp.readlines()
with open(output_file_name, "wb") as out:
@@ -135,10 +134,10 @@ def convert_file(input_file_name, output_file_name):
traceback.print_exc()
def plot_file(file, title = None):
def plot_file(file_name, title = None):
"""
"""
table = Table.load(file, "\t", '#')
table = Table.load(file_name, "\t", '#')
plots = plot(table, title = title)