26 lines
779 B
Python
26 lines
779 B
Python
|
|
def set_pol_cplus(offset = None, timeout = -1):
|
|
"""
|
|
"""
|
|
print "Set x-ray polarization to c+"
|
|
timeout = int(timeout *1000) if timeout>0 else timeout
|
|
pol_mode.write("CIRC +")
|
|
if offset is not None:
|
|
pol_offset.write(float(offset))
|
|
time.sleep(0.5)
|
|
pol_done.update()
|
|
pol_done.waitValue("DONE",timeout)
|
|
print "Done setting x-ray polarization"
|
|
|
|
def set_pol_cminus(offset = None, timeout = -1):
|
|
"""
|
|
"""
|
|
print "Set x-ray polarizaton to c-"
|
|
timeout = int(timeout *1000) if timeout>0 else timeout
|
|
pol_mode.write("CIRC -")
|
|
if offset is not None:
|
|
pol_offset.write(float(offset))
|
|
time.sleep(0.5)
|
|
pol_done.update()
|
|
pol_done.waitValue("DONE",timeout)
|
|
print "Done setting x-ray polarization" |