From b9dfe6d7515807083e44213f5ef27b08474f2eed Mon Sep 17 00:00:00 2001 From: appleb_m Date: Tue, 2 Jun 2026 10:54:39 +0200 Subject: [PATCH] jfjoch: now sending unit cell and space group if provided from spreadsheet --- src/aare/devices/jfjoch.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/src/aare/devices/jfjoch.py b/src/aare/devices/jfjoch.py index 6ef44a8c..9b4e1649 100644 --- a/src/aare/devices/jfjoch.py +++ b/src/aare/devices/jfjoch.py @@ -178,6 +178,24 @@ class JFJochWrapper: ) dataset_settings.xray_fluorescence_spectrum = xrf + if s.sample.aaredb_params: + if s.sample.aaredb_params.cellparameters: + unit_cell_db = s.sample.aaredb_params.cellparameters + unit_cell_split = unit_cell_db.replace(",", " ").split() + unit_cell_floats = [float(x) for x in unit_cell_split] + unit_cell = jfjoch_client.UnitCell( + a=unit_cell_floats[0], + b=unit_cell_floats[1], + c=unit_cell_floats[2], + alpha=unit_cell_floats[3], + beta=unit_cell_floats[4], + gamma=unit_cell_floats[5] + ) + dataset_settings.unit_cell = unit_cell + if s.sample.aaredb_params.spacegroupnumber: + space_group_number = s.sample.aaredb_params.spacegroupnumber + dataset_settings.space_group_number = space_group_number + return dataset_settings def __start_scan(