Workflows - temporarily added back sa2se and common2rse methods.
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
from aare.common.coordinate import Coordinate
|
||||
from aare.common.models import StagePositionEnum
|
||||
from aare.daq.devices import BeamlineDevices
|
||||
from aare.daq.config import BeamlineConfig
|
||||
from aare.daq.config import BeamlineConfig, ABR_POS_MOUNT
|
||||
|
||||
|
||||
def move_bsz(devs: BeamlineDevices, target: float):
|
||||
if abs(target - devs.bsz.position) > 0.1:
|
||||
@@ -25,13 +28,39 @@ def wait_for_se_devices(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
pass
|
||||
|
||||
def common_2rse(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
pass
|
||||
print('move collimator and scintillator to 20')
|
||||
devs.collimator = 20.0
|
||||
devs.scintillator = 20.0
|
||||
print('move smargon home')
|
||||
devs.smargon_move_home()
|
||||
print('try to move aerotech')
|
||||
devs.aerotech_pos = Coordinate(x=18.0, y=0.0, z=0.0)
|
||||
devs.aerotech_omega = 0.0
|
||||
print('move bl to park')
|
||||
devs.reflector_up = StagePositionEnum.PARK
|
||||
print('move bs to park')
|
||||
devs.beamstop_stage_up = StagePositionEnum.PARK
|
||||
print('move cryo to park')
|
||||
devs.__cryojet_pos = StagePositionEnum.PARK
|
||||
|
||||
def m2se(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
pass
|
||||
|
||||
def sa2se(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
pass
|
||||
print('move collimator and scintillator to 20')
|
||||
devs.collimator = 20.0
|
||||
devs.scintillator = 20.0
|
||||
print('move smargon home')
|
||||
devs.smargon_move_home()
|
||||
print('try to move aerotech')
|
||||
devs.aerotech_pos = Coordinate(x=18.0, y=0.0, z=0.0)
|
||||
devs.aerotech_omega = 0.0
|
||||
print('move bl to park')
|
||||
devs.reflector_up = StagePositionEnum.PARK
|
||||
print('move bs to park')
|
||||
devs.beamstop_stage_up = StagePositionEnum.PARK
|
||||
print('move cryo to park')
|
||||
devs.__cryojet_pos = StagePositionEnum.PARK
|
||||
|
||||
def sa2rse(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
common_2rse(devs, cfg)
|
||||
@@ -40,7 +69,7 @@ def dc2rse(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
common_2rse(devs, cfg)
|
||||
|
||||
def se2sa(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
pass
|
||||
devs.reflector_up = StagePositionEnum.MEASURE
|
||||
|
||||
def rse2sa(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
se2sa(devs, cfg)
|
||||
@@ -94,3 +123,13 @@ def sa2dh(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
|
||||
def dh2sa(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
pass
|
||||
|
||||
if __name__ == "__main__":
|
||||
from aare.common.beamline import mx_beamline
|
||||
import time
|
||||
bl = mx_beamline()
|
||||
cfg = BeamlineConfig(bl)
|
||||
devs = BeamlineDevices(bl)
|
||||
common_2rse(devs, cfg)
|
||||
time.sleep(10.0)
|
||||
rse2sa(devs, cfg)
|
||||
Reference in New Issue
Block a user