Closedown
This commit is contained in:
@@ -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)
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
@@ -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)
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user