DAQ: added ml_bounding_box to loop centering, creates grid scan grid using ml. Fixed bug where filename wouldn't iterate for copied grid scans.
This commit is contained in:
1 parent
804d18db4d
commit
731efccc2b
8 files changed
+124
-18
No files matched your search
@@ -7,7 +7,8 @@ import urllib3
|
||||
import uvicorn
|
||||
from aaredaqlib.coordinate import SmargonCoordinate, Coordinate
|
||||
from aaredaqlib.models import SampleShortInfo, DAQStatusModel, BeamlineStateEnum, BeamlineSettingsModel, \
|
||||
SampleShortInfoList, SessionStatus, SampleCameraSettings, AutofocusSettings, TokenData
|
||||
SampleShortInfoList, SessionStatus, SampleCameraSettings, AutofocusSettings, TokenData, \
|
||||
CryojetSettingsModel
|
||||
from aaredaqlib.raster_grid import RasterGridRequest, CompletedRasterGrid
|
||||
from aaredaqlib.rotation_scan import RotationScanRequest, CompletedRotationScan
|
||||
from aaredaqlib.sample_geometry import SampleGeometryModel
|
||||
@@ -330,11 +331,9 @@ async def alc_center_loop(token: str = Depends(oauth2_scheme)) -> str:
|
||||
|
||||
|
||||
@app.post("/alc/ml_bounding_box")
|
||||
async def alc_ml_bounding_box(token: str = Depends(oauth2_scheme), move: bool = False, filename: str = "") -> Tuple[
|
||||
float, float, float, float] | None:
|
||||
async def alc_ml_bounding_box(token: str = Depends(oauth2_scheme)) -> RasterGridRequest | None:
|
||||
auth.check_jwt_rw(cfg, auth.parse_token(token))
|
||||
return daq.ml_bounding_box(move=move)
|
||||
|
||||
return daq.ml_bounding_box()
|
||||
|
||||
# Access management
|
||||
@app.get("/access/pgroup")
|
||||
@@ -387,6 +386,15 @@ async def put_settings(s: BeamlineSettingsModel, token: str = Depends(oauth2_sch
|
||||
auth.check_jwt_staff(auth.parse_token(token))
|
||||
cfg.settings = s
|
||||
|
||||
@app.get("/beamline/cryo_settings")
|
||||
async def get_cryo_settings(token: str = Depends(oauth2_scheme)) -> CryojetSettingsModel:
|
||||
auth.check_jwt_staff(auth.parse_token(token))
|
||||
return cfg.cryojet_settings
|
||||
|
||||
@app.put("/beamline/cryo_settings")
|
||||
async def put_cryo_settings(s: CryojetSettingsModel, token: str = Depends(oauth2_scheme)):
|
||||
auth.check_jwt_staff(auth.parse_token(token))
|
||||
cfg.cryojet_settings = s
|
||||
|
||||
LOGGING_CONFIG = {
|
||||
"version": 1,
|
||||
|
||||
Reference in new issue
Block a user