From 6aefbcb2a4dad3c012c746cfed76c708ef6a98cf Mon Sep 17 00:00:00 2001 From: x12sa Date: Fri, 16 Jan 2026 09:46:41 +0100 Subject: [PATCH] fixes during commissioning --- .../plugins/cSAXS/filter_transmission.py | 16 +++++++++++----- .../bec_ipython_client/plugins/cSAXS/smaract.py | 6 ++++-- 2 files changed, 15 insertions(+), 7 deletions(-) diff --git a/csaxs_bec/bec_ipython_client/plugins/cSAXS/filter_transmission.py b/csaxs_bec/bec_ipython_client/plugins/cSAXS/filter_transmission.py index 1f68ed7..a31d82c 100644 --- a/csaxs_bec/bec_ipython_client/plugins/cSAXS/filter_transmission.py +++ b/csaxs_bec/bec_ipython_client/plugins/cSAXS/filter_transmission.py @@ -15,6 +15,13 @@ Implements fil_trans physics: Motion is executed using provided position tables for each filter_array_*_x stage. """ + +#todo +#check dmm is off +#X12SA-OP-DMM-EMLS-3010:THRU translation THROUGH +#X12SA-OP-DMM-EMLS-3030:THRU bragg through +#X12SA-OP-CCM1:ENERGY-GET > 1 + from __future__ import annotations import math @@ -150,7 +157,7 @@ class cSAXSFilterTransmission: # ----------------------------- - def fil_trans_select( + def fil_trans( self, transmission: Optional[float] = None, energy_kev: Optional[float] = None, @@ -163,10 +170,9 @@ class cSAXSFilterTransmission: """ if transmission is None: - print("\nUsage:") - print(" csaxs.fil_trans_select(, energy_kev=, print_only=True)") - print("Example:") - print(" csaxs.fil_trans_select(0.10, energy_kev=6.2)") + print("\nUsage example:") + print(" csaxs.fil_trans(0.10, energy_kev=6.2)") + print(" First parameter is the transmission factor requested.\nIf energy is not specified it will be read from the monochromator (in the future)") print("\nCurrent filter transmission:") self._fil_trans_report(energy_kev=energy_kev) return None diff --git a/csaxs_bec/bec_ipython_client/plugins/cSAXS/smaract.py b/csaxs_bec/bec_ipython_client/plugins/cSAXS/smaract.py index f6b28e1..15ca7fc 100644 --- a/csaxs_bec/bec_ipython_client/plugins/cSAXS/smaract.py +++ b/csaxs_bec/bec_ipython_client/plugins/cSAXS/smaract.py @@ -51,7 +51,8 @@ class cSAXSInitSmaractStages: def __init__(self, client) -> None: self.client = client - def smaract_initialize_all_stages(self): + def smaract_reference_stages(self): + #Todo make possible to ref all stages or just those not referenced yet. also init motion only of those newly referenced """ Initialize all Smaract stages by setting speed, finding the reference mark, and sleeping. """ @@ -103,6 +104,7 @@ class cSAXSInitSmaractStages: self, skip_devices=None, ): + #todo just move those that are referenced, with option to select individual ones """ Move all SmarAct-based components to their configured init_position. @@ -173,7 +175,7 @@ class cSAXSInitSmaractStages: + ", ".join(not_referenced) ) bec_logger.logger.error( - "[cSAXS] Aborting motion. Please reference axes first. \nOr skip the axes by e.g. \nsmaract_all_components_to_initial_position(skip_devices=[\"fast_shutter_n1_x\",\"fast_shutter_o1_x\"]" + "[cSAXS] Aborting motion. Please reference axes first. \nOr skip the axes by e.g. \nsmaract_all_components_to_initial_position(skip_devices=[\"fast_shutter_n1_x\",\"fast_shutter_o1_x\"])" ) return