aarelc_infer.py and yaml updated url for 6D
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import cv2
|
||||
import numpy as np
|
||||
from aarelcinfer_client import Client, AuthenticatedClient
|
||||
from aarelcinfer_client.api import config, predictions#, beam
|
||||
from aarelcinfer_client.api import config, predictions, beam
|
||||
from aarelcinfer_client.models import RuntimeConfigPatchModel, LatestPredictionModel
|
||||
import io
|
||||
from PIL import Image
|
||||
@@ -16,10 +16,10 @@ class AareLCInferWrapper:
|
||||
bl: MXBeamline,
|
||||
secret: str = "1s3ng@rd",
|
||||
):
|
||||
if bl == MXBeamline.X10SA:
|
||||
host = cfg_get("daq.hardware.aarelc_url", "http://sls-gpu-003:9090")
|
||||
elif bl == MXBeamline.X06DA:
|
||||
host = cfg_get("daq.hardware.aarelc_url", "http://sls-gpu-003:9094")
|
||||
if bl == MXBeamline.X10SA or bl == MXBeamline.X06DA:
|
||||
host = cfg_get("daq.hardware.aarelc_url")
|
||||
if host is None:
|
||||
raise Exception("AareLCInferWrapper: AareLC URL not configured")
|
||||
elif bl == MXBeamline.X06SA:
|
||||
raise NotImplementedError(f"AareLCInferWrapper not implemented for {bl}")
|
||||
elif bl == MXBeamline.SIMULATED:
|
||||
@@ -32,7 +32,7 @@ class AareLCInferWrapper:
|
||||
self._host = host
|
||||
self._api_config = config
|
||||
self._api_predictions = predictions
|
||||
#self._api_beam = beam
|
||||
self._api_beam = beam
|
||||
|
||||
def get_config(self) -> config.ConfigSnapshotResponse:
|
||||
return self._api_config.get_config(self.client)
|
||||
@@ -49,8 +49,8 @@ class AareLCInferWrapper:
|
||||
def get_latest_prediction_bundle(self):
|
||||
return self._api_predictions.get_latest_prediction_bundle(self.client)
|
||||
|
||||
# def send_samcam_details(self, beam_mark, beam_dimensions):
|
||||
# return self._api_beam.set_beam_mark(beam_mark, beam_dimensions)
|
||||
def send_samcam_details(self, beam_mark, beam_dimensions):
|
||||
return self._api_beam.set_beam_mark(beam_mark, beam_dimensions)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
|
||||
@@ -25,7 +25,7 @@ daq:
|
||||
tell_url: "http://x06da-tell.psi.ch:22222"
|
||||
bec_url: "x06da-bec-001.psi.ch"
|
||||
redis_url: "x06da-redis.psi.ch"
|
||||
aarelc_url: "http://sls-gpu-003:9090"
|
||||
aarelc_url: "http://sls-gpu-003:9094"
|
||||
|
||||
db:
|
||||
aaredb_url: "https://mx-aaredb-dmz-01.psi.ch/dispatcher"
|
||||
@@ -45,4 +45,6 @@ daq:
|
||||
steps: 1800
|
||||
|
||||
detector_limit_modifier: 2.0
|
||||
maximum_flux: 4e11
|
||||
maximum_flux: 4e11
|
||||
dtz_minimum: 106.0
|
||||
dtz_maximum: 800.0
|
||||
Reference in New Issue
Block a user