DAQ: More work during the beamtime preparations
Build and Publish / build (push) Successful in 22s

This commit is contained in:
2025-06-18 17:27:11 +02:00
parent 486d65c7cc
commit 05a01f4efb
7 changed files with 26 additions and 15 deletions
+1 -1
View File
@@ -7,7 +7,7 @@ requires-python = ">=3.11"
dependencies = [
"pydantic==2.11.4",
"numpy==2.2.5",
"jfjoch_client==1.0.0rc45",
"jfjoch_client==1.0.0rc49",
"aareDB==0.1.1a8"
]
+4 -4
View File
@@ -16,7 +16,7 @@ from aareDBclient import (
GridScanParameters,
Datasets,
Detector as DetectorParameters,
BeamlineParameters,
BeamlineParametersInput,
ExperimentParametersCreate)
from aaredaqlib.diffraction_geometry import DiffractionGeometry
@@ -180,7 +180,7 @@ class AareWrapper:
pixelSizeY_um=d.diffraction.pixel_size_mm * 1000,
dataset=dataset
)
beamline_params = BeamlineParameters(
beamline_params = BeamlineParametersInput(
synchrotron="Swiss Light Source",
beamline=d.bl.name,
detector=detector_data,
@@ -240,7 +240,7 @@ class AareWrapper:
pixelSizeY_um=d.diffraction.pixel_size_mm * 1000,
dataset=dataset
)
beamline_params = BeamlineParameters(
beamline_params = BeamlineParametersInput(
synchrotron="Swiss Light Source",
beamline=d.bl.name,
detector=detector_data,
@@ -303,7 +303,7 @@ class AareWrapper:
pixelSizeY_um=d.diffraction.pixel_size_mm * 1000,
dataset=dataset
)
beamline_params = BeamlineParameters(
beamline_params = BeamlineParametersInput(
synchrotron="Swiss Light Source",
beamline=d.bl.name,
detector=detector_data,
+1 -3
View File
@@ -286,9 +286,7 @@ def sa2dh(devs: BeamlineDevices, cfg: BeamlineConfig):
except Exception as e:
print(f"Error for unmounting: {e}")
devs.tell.dry(wait_cold=-1, wait=False)
# devs.tell.move_park(wait=True)
#devs.tell.set_samples_info(devs.aare.get_pucks_beamline())# replaced by script stream
def dh2sa(devs: BeamlineDevices, cfg: BeamlineConfig):
devs.aare.set_pucks_beamline(devs.tell.get_detected_pucks())
devs.tell.move_cold(wait=True)
+10 -2
View File
@@ -42,11 +42,17 @@ class JFJochWrapper:
pgroup = s.sample.user
sample = s.sample.sample_name
if r.screening:
wedge = r.wedge_omega_deg
else:
wedge = None
goniometer_settings = jfjoch_client.RotationAxis(
step=r.incr_omega_deg,
start=r.start_omega_deg,
name="omega",
vector= [0,1,0]
vector= [0,1,0],
screening_wedge_deg = wedge
)
if r.screening:
@@ -102,7 +108,9 @@ class JFJochWrapper:
sample_name=sample,
image_time_us=round(r.exp_time_s * 1e6),
experiment_group=pgroup,
transmission=s.bl.transmission
transmission=s.bl.transmission,
ring_current_m_a=s.bl.ring_current_mA,
sample_temperature_k=s.bl.cryojet_K
)
self.__api.start_post(dataset_settings=dataset_settings)
+5 -2
View File
@@ -363,10 +363,13 @@ class TellClient:
if wait:
self.check_command_ok(timeout=360.0, msg=f"Move to park failed")
def move_cold(self, reset_timestamp=False):
def move_cold(self, reset_timestamp=False, wait=False):
if self.__simulation:
return
return self.start_cmd("move_cold", reset_timestamp)
self._last_cmd_id = self.start_cmd("move_cold", reset_timestamp)
if wait:
self.check_command_ok(timeout=360.0, msg=f"Move to park failed")
def trash(self):
if self.__simulation:
@@ -212,7 +212,7 @@ class RasterGridManager(QObject):
txt += f"Spot count {grid.result.images[cell].spots}<br/>"
if grid.result.images[cell].index is not None and grid.result.images[cell].index > 0 and grid.result.images[cell].uc is not None:
txt += f"Indexed {grid.result.images[cell].uc.a:.1f} {grid.result.images[cell].uc.b:.1f} {grid.result.images[cell].uc.c:.1f} {grid.result.images[cell].uc.alpha:.1f} {grid.result.images[cell].uc.beta:.1f}{grid.result.images[cell].uc.gamma:.1f}<br/>"
txt += f"Indexed {grid.result.images[cell].uc.a:.1f} {grid.result.images[cell].uc.b:.1f} {grid.result.images[cell].uc.c:.1f} {grid.result.images[cell].uc.alpha:.1f} {grid.result.images[cell].uc.beta:.1f} {grid.result.images[cell].uc.gamma:.1f}<br/>"
if grid.result.images[cell].b is not None and grid.result.images[cell].b >= 0:
txt += f"B-factor {grid.result.images[cell].b:.2f}<br/>"
+4 -2
View File
@@ -408,12 +408,14 @@ class SampleCameraImageLabel(QGraphicsView):
if not self.wheel_event_timer.isActive():
delta_y = event.angleDelta().y()
if event.modifiers() & Qt.KeyboardModifier.MetaModifier:
if event.modifiers() & Qt.KeyboardModifier.AltModifier:
new_exp_time = self.__sam_cam.exposure * (1.0 + math.copysign(0.1, delta_y))
new_settings = SampleCameraSettings(exposure=new_exp_time, gain=self.__sam_cam.gain)
self.samcam_updated.emit(new_settings)
elif event.modifiers() & Qt.KeyboardModifier.ControlModifier:
self.set_omega.emit(self.__geom.omega_deg + math.copysign(180.0, delta_y))
new_exp_time = self.__sam_cam.exposure * (1.0 + math.copysign(0.5, delta_y))
new_settings = SampleCameraSettings(exposure=new_exp_time, gain=self.__sam_cam.gain)
self.samcam_updated.emit(new_settings)
elif event.modifiers() & Qt.KeyboardModifier.ShiftModifier:
self.set_omega.emit(self.__geom.omega_deg + math.copysign(10.0, delta_y))
else: