Enable screening mode for rotation scans and improve logging/debug messages in rotation and raster services.
This commit is contained in:
@@ -9,7 +9,7 @@ from jfjoch_client.exceptions import NotFoundException
|
||||
from aare.common.coordinate import AerotechCoordinate, Coordinate, SmargonCoordinate
|
||||
from aare.common.exception_handler import AutoRasterSampleSkipped, RasterScanException
|
||||
from aare.common.find_xtal import raster_highest_score, get_xtal_size, get_best_res, \
|
||||
get_best_b_factor
|
||||
get_best_b_factor, compute_crystal_score_array
|
||||
from aare.common.logger_events import (
|
||||
geom_log_context,
|
||||
log_ml_bundle_meta,
|
||||
@@ -613,7 +613,7 @@ class RasterService:
|
||||
},
|
||||
),
|
||||
)
|
||||
self.ctx.deps.cfg.crystal_size = get_xtal_size(self.ctx.deps.cfg.crystal_size, result_array, r=request)
|
||||
self.ctx.deps.cfg.crystal_size = get_xtal_size(self.ctx.deps.cfg.crystal_size, compute_crystal_score_array(scan_result.images), r=request)
|
||||
self.ctx.deps.cfg.last_best_res = get_best_res(result_list= scan_result.images)
|
||||
self.ctx.deps.cfg.last_best_b_factor = get_best_b_factor(result_list=scan_result.images)
|
||||
return CompletedRasterGridElem(
|
||||
|
||||
@@ -47,6 +47,7 @@ class RotationService:
|
||||
self.ctx.deps.devs.set_dtz(request.dtz, wait=True)
|
||||
|
||||
if request.screening:
|
||||
self.logger.debug(f"Starting screening scan with {request.steps} steps")
|
||||
self.ctx.deps.devs.aerotech.screening_scan(
|
||||
rotation_deg=request.steps * request.incr_omega_deg,
|
||||
wedge_deg=request.wedge_omega_deg,
|
||||
@@ -55,6 +56,7 @@ class RotationService:
|
||||
run_async=True,
|
||||
)
|
||||
else:
|
||||
self.logger.debug(f"Starting rotation scan with {request.steps} steps")
|
||||
self.ctx.deps.devs.aerotech.rotation_scan(
|
||||
rotation_deg=request.steps * request.incr_omega_deg,
|
||||
time_sec=total_time,
|
||||
@@ -156,6 +158,7 @@ class RotationService:
|
||||
# For screening runs, ingest the per-wedge diffraction images. Done
|
||||
# before the COLLECTED event so they pin to the same sample event the
|
||||
# run is bound to (the COLLECTING event), matching the preview above.
|
||||
self.logger.debug(f"Ingesting screening diffraction images: {request.screening}")
|
||||
if request.screening and not self.ctx.deps.cfg.simulated_detector:
|
||||
self._ingest_screening_diffraction(sample, result.result)
|
||||
|
||||
|
||||
@@ -150,10 +150,11 @@ class RotationDataCollectionPanel(ScanSettingsPanel):
|
||||
file_prefix=str(add_screening_to_path(self._filename)),
|
||||
start_omega_deg=self.start_angle.value,
|
||||
incr_omega_deg=self.screening_image_angle.value,
|
||||
wedge_omega_deg=screening_settings["omega_step_deg"],
|
||||
steps=1,
|
||||
dtz=self._dtz,
|
||||
transmission=self._transmission,
|
||||
screening=False,
|
||||
screening=True,
|
||||
exp_time_s=self.screening_image_time_enter.value,
|
||||
)
|
||||
else:
|
||||
|
||||
Reference in New Issue
Block a user