fix: always trunacte dtz
CI / lint (push) Skipped
CI / test (3.11) (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) Failing after 33s
CI / test (3.11) (pull_request) Successful in 1m2s
CI / test (3.12) (pull_request) Successful in 1m2s
CI / test (3.13) (pull_request) Successful in 1m6s
CI / test-with-beamline-plugins (pxi_bec) (pull_request) Successful in 1m16s
CI / test-with-beamline-plugins (pxiii_bec) (pull_request) Successful in 1m18s
CI / test-with-beamline-plugins (pxii_bec) (pull_request) Successful in 1m25s
CI / test-with-coverage (pull_request) Successful in 1m40s
CI / coverage-analysis (pull_request) Failing after 4s

This commit is contained in:
David Perl
2026-08-21 16:57:54 +02:00
parent dec8b036a1
commit 53493df5a1
+6 -4
View File
@@ -1617,6 +1617,7 @@ class AareDAQ:
params = SimpleScanParameters()
if (exp := getattr(aaredb_params, "exposure", None)) is not None:
params.exp_time_s = exp
@@ -1630,12 +1631,13 @@ class AareDAQ:
new_res = 1 / ((1 / res) + 0.01)
corrected_dtz = self.diffraction_geometry.calc_dtz_mm(new_res)
logger.debug(f"corrected dtz: {corrected_dtz}")
if corrected_dtz < self._devs.dtz_low:
logger.warning(
params.dtz = round(corrected_dtz)
if params.dtz < self._devs.dtz_low:
logger.warning(
f"Detector distance based on desired resolution cannot be reached, using minimum of {self._devs.dtz_low}."
)
corrected_dtz = self._devs.dtz_low
params.dtz = round(corrected_dtz)
params.dtz = self._devs.dtz_low
osc = getattr(aaredb_params, "oscillation", None)
total = getattr(aaredb_params, "totalrange", None)