diff --git a/.copier-answers.yml b/.copier-answers.yml index 5b660e9..876f4c1 100644 --- a/.copier-answers.yml +++ b/.copier-answers.yml @@ -2,7 +2,7 @@ # It is needed to track the repo template version, and editing may break things. # This file will be overwritten by copier on template updates. -_commit: v1.2.1 +_commit: v1.2.2 _src_path: https://github.com/bec-project/plugin_copier_template.git make_commit: false project_name: csaxs_bec diff --git a/.gitea/workflows/ci.yml b/.gitea/workflows/ci.yml index 2f23fb2..4573e56 100644 --- a/.gitea/workflows/ci.yml +++ b/.gitea/workflows/ci.yml @@ -94,4 +94,4 @@ jobs: - name: Run Pytest with Coverage id: coverage - run: pytest --random-order --cov=./csaxs_bec --cov-config=./csaxs_bec/pyproject.toml --cov-branch --cov-report=xml --no-cov-on-fail ./csaxs_bec/tests/ + run: pytest --random-order --cov=./csaxs_bec --cov-config=./csaxs_bec/pyproject.toml --cov-branch --cov-report=xml --no-cov-on-fail ./csaxs_bec/tests/ || test $? -eq 5 diff --git a/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py b/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py index 8fd6161..94508a4 100644 --- a/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py +++ b/csaxs_bec/bec_ipython_client/plugins/flomni/flomni.py @@ -416,7 +416,7 @@ class FlomniSampleTransferMixin: def laser_tracker_on(self): dev.rtx.controller.laser_tracker_on() time.sleep(0.2) - self._laser_tracker_check_signalstrength() + dev.rtx.controller.laser_tracker_check_signalstrength() def laser_tracker_off(self): dev.rtx.controller.laser_tracker_off() @@ -429,11 +429,11 @@ class FlomniSampleTransferMixin: def feedback_enable_with_reset(self): self.device_manager.devices.rtx.controller.feedback_enable_with_reset() - self.rt_feedback_status() + self.feedback_status() def feedback_enable_without_reset(self): self.device_manager.devices.rtx.controller.feedback_enable_without_reset() - self.rt_feedback_status() + self.feedback_status() def feedback_status(self): feedback_status = self.device_manager.devices.rtx.controller.feedback_is_running() diff --git a/csaxs_bec/bec_widgets/widgets/omny_alignment/omny_alignment.py b/csaxs_bec/bec_widgets/widgets/omny_alignment/omny_alignment.py index 089101f..5d47042 100644 --- a/csaxs_bec/bec_widgets/widgets/omny_alignment/omny_alignment.py +++ b/csaxs_bec/bec_widgets/widgets/omny_alignment/omny_alignment.py @@ -63,6 +63,8 @@ class OmnyAlignment(BECWidget, QWidget): self.ui.liveViewSwitch.enabled.connect(self.on_live_view_enabled) + self.ui.moveUpButton.clicked.connect(self.on_move_up) + @property def enable_live_view(self): @@ -102,7 +104,6 @@ class OmnyAlignment(BECWidget, QWidget): image.disconnect_monitor("cam200") - @property def enable_move_buttons(self): move_up:QPushButton = self.ui.moveUpButton diff --git a/csaxs_bec/scans/flomni_fermat_scan.py b/csaxs_bec/scans/flomni_fermat_scan.py index f1cc55c..651f8f0 100644 --- a/csaxs_bec/scans/flomni_fermat_scan.py +++ b/csaxs_bec/scans/flomni_fermat_scan.py @@ -172,7 +172,7 @@ class FlomniFermatScan(SyncFlyScanBase): self.device_manager.connector.raise_alarm( severity=0, alarm_type="LaserTrackerSignalStrength", - source="rtx", + source={"device": "rtx", "reason": "low signal strength", "method": "_prepare_setup_part2"}, metadata={}, msg="Signal strength of the laser tracker is low, sufficient to continue. Realignment recommended!", ) @@ -295,9 +295,10 @@ class FlomniFermatScan(SyncFlyScanBase): logger.debug("reading monitors") # yield from self.device_rpc("rtx", "controller.kickoff") - def return_to_start(self): + def move_to_start(self): """return to the start position""" - # in flomni, we need to move to the start position of the next scan + # in flomni, we need to move to the start position of the next scan, which is the end position of the current scan + # this method is called in finalize and overwrites the default move_to_start() if isinstance(self.positions, np.ndarray) and len(self.positions[-1]) == 3: yield from self.stubs.set(device=["rtx", "rty", "rtz"], value=self.positions[-1]) return diff --git a/csaxs_bec/scans/omny_fermat_scan.py b/csaxs_bec/scans/omny_fermat_scan.py index 4529ee8..9cb902b 100644 --- a/csaxs_bec/scans/omny_fermat_scan.py +++ b/csaxs_bec/scans/omny_fermat_scan.py @@ -280,9 +280,10 @@ class OMNYFermatScan(SyncFlyScanBase): logger.debug("reading monitors") # yield from self.device_rpc("rtx", "controller.kickoff") - def return_to_start(self): + def move_to_start(self): """return to the start position""" - # in omny, we need to move to the start position of the next scan + # in omny, we need to move to the start position of the next scan, which is the end position of the current scan + # this method is called in finalize and overwrites the default move_to_start() if isinstance(self.positions, np.ndarray) and len(self.positions[-1]) == 3: yield from self.stubs.set(device=["rtx", "rty", "rtz"], value=self.positions[-1]) return diff --git a/docs/user/ptychography/flomni.md b/docs/user/ptychography/flomni.md index b9b4f95..560abd0 100644 --- a/docs/user/ptychography/flomni.md +++ b/docs/user/ptychography/flomni.md @@ -147,8 +147,14 @@ Following functions exist to move the optics in and out, with self-explaining na The position feedback in flOMNI is controlled in closed loop to an interferometric position measurement. To show the signal of the interferometers: `flomni.show_signal_strength_interferometer()` -Typical values with proper alignment, sample stage at the measurement position and laser tracker running are -_TODO_ +Typical values with proper alignment, sample stage at the measurement position and laser tracker running are in the range of +| Axis | Value | +| --- | --- | +| 0 | 13681.0 | +| 1 | 12383.0 | +| 2 | 10716.0 | +| 3 | 11032.0 | + #### Laser tracker commands @@ -162,10 +168,10 @@ The horizontal interferometer is built according to the [tracking interferometer #### Interferometer feedback commands The closed loop control of the Piezo stages can be controlled by -- `flomni.rt_feedback_enable_with_reset()`. +- `flomni.feedback_feedback_enable_with_reset()`. _There is also an enable without reset, which is used during tomography scans, when using coarse stages to increase the scan range. It should not be required to use manually._ -- `flomni.rt_feedback_disable()` -- `flomni.rt_feedback_status()` +- `flomni.feedback_disable()` +- `flomni.feedback_status()` ### Scanning in 2D and sample alignment