feat: use rotation scan defaut settings from config service
CI / lint (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / lint (pull_request) Successful in 1m6s
CI / test (3.13) (pull_request) Successful in 3m41s
CI / test (3.12) (pull_request) Successful in 3m44s
CI / test (3.14) (pull_request) Successful in 3m43s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 3m46s
CI / test-with-coverage (pull_request) Successful in 3m54s
CI / coverage-analysis (pull_request) Failing after 3s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Failing after 4m10s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Canceled after 4m16s
CI / lint (push) Skipped
CI / test (3.12) (push) Skipped
CI / test (3.13) (push) Skipped
CI / test-with-beamline-plugins (pxi_bec) (push) Skipped
CI / test-with-beamline-plugins (pxii_bec) (push) Skipped
CI / test-with-beamline-plugins (pxiii_bec) (push) Skipped
CI / lint (pull_request) Successful in 1m6s
CI / test (3.13) (pull_request) Successful in 3m41s
CI / test (3.12) (pull_request) Successful in 3m44s
CI / test (3.14) (pull_request) Successful in 3m43s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 3m46s
CI / test-with-coverage (pull_request) Successful in 3m54s
CI / coverage-analysis (pull_request) Failing after 3s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Failing after 4m10s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Canceled after 4m16s
This commit is contained in:
1 parent
b1fecd8714
commit
6fce0925b3
4 files changed
+12
-12
No files matched your search
+1
-1
@@ -33,7 +33,7 @@ dependencies = [
|
||||
"aarelcinfer-client==0.1.1a8",
|
||||
"matplotlib>=3.10.3",
|
||||
"httpx>=0.28.1",
|
||||
"aare-config>=0.1.7",
|
||||
"aare-config>=0.3.0",
|
||||
]
|
||||
|
||||
[project.optional-dependencies]
|
||||
|
||||
@@ -4,6 +4,7 @@ from abc import ABC
|
||||
from importlib.resources import files
|
||||
from typing import Any
|
||||
|
||||
from aare_config import AareConfigClient
|
||||
from aarecommon.config.beamline import MXBeamline
|
||||
from aarecommon.models.beam_centre import BeamCentre
|
||||
|
||||
@@ -46,6 +47,9 @@ class DefaultDispatch(BeamlineDispatch, ABC):
|
||||
) -> None:
|
||||
self._auth = DefaultAuthDispatch()
|
||||
self._geo = geo_class(beamline=beamline)
|
||||
self._config = AareConfigClient(
|
||||
redis_url=f"redis://mx-{beamline.value.lower()}-queue-01", key_prefix="config"
|
||||
)
|
||||
|
||||
@property
|
||||
def auth(self):
|
||||
@@ -57,7 +61,13 @@ class DefaultDispatch(BeamlineDispatch, ABC):
|
||||
|
||||
@property
|
||||
def default_rotation_parameters(self) -> dict[str, Any]:
|
||||
return {"exp_time_s": 0.04, "dtz": 110, "incr_omega_deg": 0.2}
|
||||
defaults = self._config.rotation_defaults
|
||||
return {
|
||||
"exp_time_s": defaults.exp_time_s,
|
||||
"dtz": defaults.detector_distance_mm,
|
||||
"incr_omega_deg": defaults.image_width_deg,
|
||||
"transmission": defaults.transmission_fraction,
|
||||
}
|
||||
|
||||
@property
|
||||
def default_auto_raster_parameters(self) -> dict[str, Any]:
|
||||
|
||||
@@ -109,11 +109,6 @@ class X06daDispatch(DefaultDispatch):
|
||||
def bec_macros(self) -> BecMacros:
|
||||
return self._bec_macros
|
||||
|
||||
@property
|
||||
def default_rotation_parameters(self) -> dict[str, Any]:
|
||||
default = super().default_rotation_parameters
|
||||
return default | {"transmission": 1.0}
|
||||
|
||||
@property
|
||||
def default_auto_raster_parameters(self) -> dict[str, Any]:
|
||||
return {"exp_time_s": 0.04, "transmission": 1.0, "dtz": 150}
|
||||
@@ -110,11 +110,6 @@ class X10saDispatch(DefaultDispatch):
|
||||
def bec_macros(self) -> BecMacros:
|
||||
return self._bec_macros
|
||||
|
||||
@property
|
||||
def default_rotation_parameters(self) -> dict[str, Any]:
|
||||
default = super().default_rotation_parameters
|
||||
return default | {"transmission": 0.1}
|
||||
|
||||
@property
|
||||
def default_auto_raster_parameters(self) -> dict[str, Any]:
|
||||
# Full transmission for 20 keV rastering
|
||||
|
||||
Reference in new issue
Block a user