DAQ: Beam location, work in progress
This commit is contained in:
1 parent
d5887363ef
commit
59539f80d4
7 files changed
+74
-28
No files matched your search
@@ -772,8 +772,13 @@ class AareDAQ:
|
||||
self.__cfg.state_busy = False
|
||||
raise e
|
||||
|
||||
def close_shutter(self):
|
||||
self.__devs.shutter = False
|
||||
@property
|
||||
def shutter(self) -> bool:
|
||||
return self.__devs.shutter
|
||||
|
||||
@shutter.setter
|
||||
def shutter(self, v: bool):
|
||||
self.__devs.shutter = v
|
||||
|
||||
@property
|
||||
def diffraction_geometry(self) -> DiffractionGeometry:
|
||||
|
||||
@@ -141,10 +141,10 @@ async def samcam_autofocus(s: AutofocusSettings, token: str = Depends(oauth2_sch
|
||||
daq.autofocus(s)
|
||||
return "OK"
|
||||
|
||||
@app.post("/shutter/close")
|
||||
async def close_shutter(token: str = Depends(oauth2_scheme)):
|
||||
@app.post("/beamline/shutter")
|
||||
async def shutter(val: bool, token: str = Depends(oauth2_scheme)):
|
||||
auth.check_jwt_rw(cfg, auth.parse_token(token))
|
||||
daq.close_shutter()
|
||||
daq.shutter = val
|
||||
return "OK"
|
||||
|
||||
|
||||
|
||||
@@ -267,10 +267,13 @@ def sa2bl(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
devs.reflector_up = False
|
||||
devs.scintillator = StagePositionEnum.MEASURE
|
||||
devs.collimator = StagePositionEnum.MEASURE
|
||||
devs.shutter = True
|
||||
|
||||
def bl2sa(devs: BeamlineDevices, cfg: BeamlineConfig):
|
||||
hub = cfg.settings
|
||||
|
||||
devs.shutter = False
|
||||
|
||||
devs.set_scintillator(StagePositionEnum.DOWN, wait=False)
|
||||
devs.set_collimator(StagePositionEnum.PARK, wait=False)
|
||||
|
||||
|
||||
Reference in new issue
Block a user