Closedown
This commit is contained in:
@@ -12,7 +12,6 @@ OFFSET = -1.0
|
||||
|
||||
FIELD_PRECISION = 0.01
|
||||
field = field_z if FIELD == "Hz" else field_x
|
||||
field_setpoint = Channel (field.channelName, 'd') #Not using energy device to have a blocking write
|
||||
|
||||
#Pre-actions
|
||||
#wait_beam()
|
||||
@@ -27,10 +26,6 @@ scan = ManualScan(['field', 'Energy'], ['TEY', 'I0', 'trans', 'polarization', 'p
|
||||
scan.start()
|
||||
|
||||
|
||||
Energy = Channel('X07MA-PHS-E:GO.A', type = 'd')
|
||||
EnergyReadback = Channel('X07MA-PGM:CERBK', type = 'd')
|
||||
|
||||
|
||||
#Dimension 1
|
||||
#RegionPositioner field
|
||||
setpoints = []
|
||||
@@ -38,6 +33,7 @@ for r in RANGES:
|
||||
setpoints = setpoints + frange(r[0], r[1], r[2], True)
|
||||
|
||||
for setpoint1 in setpoints:
|
||||
print "Field = ", setpoint1
|
||||
#PRObably not needed for newer HW
|
||||
"""
|
||||
if setpoint1 == 0.002:
|
||||
@@ -50,16 +46,19 @@ for setpoint1 in setpoints:
|
||||
caputq('X07MA-PC-PS2:SET:DMD:POINT:LFIELD_CHANGE_SLEEPOWER', '0.002')
|
||||
sleep(15.0)
|
||||
"""
|
||||
field_setpoint.write(setpoint1)
|
||||
field.write(setpoint1)
|
||||
print "-"
|
||||
readback1 = field.getPosition()
|
||||
print readback1
|
||||
if abs(readback1 - setpoint1) > FIELD_PRECISION : # TODO: Check accuracy
|
||||
raise Exception('Actor field could not be set to the value ' + str(setpoint1))
|
||||
sleep( FIELD_CHANGE_SLEEP ) # TODO: Settling time
|
||||
time.sleep( FIELD_CHANGE_SLEEP ) # TODO: Settling time
|
||||
#Dimension 2
|
||||
#ArrayPositioner Energy
|
||||
for setpoint2 in ENERGIES:
|
||||
Energy.put(setpoint2, timeout=None) # TODO: Set appropriate timeout
|
||||
readback2 = EnergyReadback.get()
|
||||
print "Energy = ", setpoint2
|
||||
energy.put(setpoint2, timeout=None) # TODO: Set appropriate timeout
|
||||
readback2 = energy_readback.get()
|
||||
if abs(readback2 - setpoint2) > 0.1 : # TODO: Check accuracy
|
||||
raise Exception('Actor Energy could not be set to the value ' + str(setpoint2))
|
||||
sleep( ENERGY_CHANGE_SLEEP ) # Settling time
|
||||
|
||||
Reference in New Issue
Block a user