x01dcandClaude Sonnet 5 c802104f6d
CI for csaxs_bec / test (push) Successful in 1m51s
fix(omny): fix stale widget-API bugs in gui_tools.py cameras/xray-eye, add cam_xeye
Live testing of the previous gui_tools.py port (49ade7c) hit two further crashes:

1. omnygui_show_xeyealign() -> ValueError: Device 'cam_xeye' not found in current
   BEC session. The OMNY_XRayEye widget (shared verbatim with flomni) hardcodes
   CAMERA = ("cam_xeye", "image") as a module constant -- it isn't configurable
   per-beamline, so omny needs its own cam_xeye device or the widget can never be
   constructed. Added cam_xeye to simulated_omny.yaml (hand-added, duplicating
   flomni's real cam_xeye's camera_id/pixel_calibration as placeholders; SimIDSCamera
   already accepts both camera_id and the legacy camera_ID key omny's other cameras
   use). ptycho_omny.yaml intentionally left untouched -- the real hardware camera ID
   and pixel calibration for OMNY's x-ray-eye camera are unknown; noted as a followup
   in OPEN_ISSUES.md, including that a future regen of simulated_omny.yaml from
   ptycho_omny.yaml will drop this hand-added block until the real config has one too.

2. omnygui_show_omnycam_parking() -> ValueError: Unknown widget type: BECImageWidget.
   That string was carried over unmodified from omny's pre-modernization code, not
   from flomni's current gui_tools.py (whose current class name is "Image"). Beyond
   the widget name, the per-camera calls inside were also stale: fig.set_rotation(
   deg_90=3) doesn't exist on the current Image/ImageBase widget at all (replaced by
   the num_rotation_90 property), and self.figN.lock_aspect_ratio(True) called a
   property as a function. Ported omnygui_show_omnycam_parking()/
   omnygui_show_omnycam_samplestage() onto flomni's current per-camera pattern
   (image(device=, signal="preview"), num_rotation_90/lock_aspect_ratio as
   properties, start_live_mode()), preserving the existing 3x90 rotation for
   cam200/cam203 (physical mount) and no rotation for cam201/cam202, unchanged from
   before.

Also removed omnygui_show_cameras() (added last pass, modeled on flomni's single
generic camera view): redundant now that both existing parking/samplestage views got
the current API, since omny -- unlike flomni -- already has two purpose-built camera
views. Its hard-stop console (z_ConsoleButtonsWidget, targeting otransy) now lives
directly in both omnygui_show_omnycam_parking() and omnygui_show_omnycam_samplestage()
instead.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QLrD7sVYGLAzsQjLVJpCgt
2026-09-01 22:19:46 +02:00
2026-08-19 12:03:18 +02:00
2025-05-24 11:37:51 +02:00

cSAXS BEC

cSAXS specific plugins and configs for BEC This document guides you through the procedure to spin up BEC at the beamline for a new experiment (e-account). You might want to run cSAXS copy scripts before in case you want to have the former data structure to be preserved.

Overview

  • Clone cSAXS BEC repository into e-account (e.g. into ~/Data10/software/.)
  • Start Epics iocs
  • Start BEC, BEC server and load/modify the device config with relevant hardware
  • BEC commands

Clone cSAXS BEC repository

Clone the current cSAXS BEC repository from GIT into the new e-account. Create directory

mkdir ~/Data10/software
cd ~/Data10/software

Clone repository

git clone https://gitlab.psi.ch/bec/csaxs_bec.git

Start epics iocs

You can start up the iocs while the ./setup_bec.sh script is running. Be aware though that the scripts requires you to interact with it.

DelayGenerator

Open a new tab in a terminal in comp1/comp2 or cons1 and follow the commands below:

ssh gac-x12sa@localhost
cd ~/delaygen
iocsh -7.0.6 startup.script

Be aware -7.0.6 is referring to the current epics version and might change in future (SLS 2.0). To start the epics panel (only if needed), run in a new shell

caqtdm -noMsg -macro P=delaygen:,R=DG1: srsDG645.ui

More notes on usages and cabelling of DDGs. Currently 3 generators are used:

  • DDG1 for detectors (EXT Enable from SGalil stages, T0 to DDG2, AB for eiger, CD for Falcon, EF for Pilatus_2)
  • DDG2 for mcs card (ext. enable from DDG1, AB to mcs card)
  • DDG3 for fast shutter and mcs enable (AB short pulse to enable MCS (needed!!), CD to keep FSH open )

Eiger

Open a new tab in a terminal in comp1/comp2 or cons1 and follow the commands below:

ssh gac-x12sa@localhost
cd ~/Software/Eiger/
./launch_ioc

A live view of status and images for std_daq can be found here xbl-daq-29:5000.

Pilatus_2

First, start the cam server. Connect to the computer and follow the instructions printed after connecting:

ssh det@x12sa-pd-2 (Pilatus2)

The cam server will open, wait until you see **. Nex step, open a new tab in a terminal in comp1/comp2 or cons1 and follow the commands below:

ssh gac-x12sa@localhost
cd ~/Software/Pilatus300K/
./launch_epics

FalconX1

Open a new tab in a terminal in comp1/comp2 or cons1 (logged in as the current e-account) and follow the commands:

ssh x12sa-cons-01
cd /ioc/X12SA-PC-FALCONX1/
iocsh -7.0.6 startup.script

Be aware -7.0.6 is referring to the current epics version and might change in future (SLS 2.0)

Start BEC, BEC server and load device config

Step 1 needs to have finished for continuing with these steps. What remains now is to start the bec server. Connect to pc15543 and open a new terminal to run:

cd ~/Data10/software
source bec_venv/bin/activate
bec-server start
tmux attach -t bec

Open another teminal on pc15543 and start BEC:

cd ~/Data10/software
source bec_venv/bin/activate
bec

Note: In case there is a warning after starting BEC that it was not able to import scilog, you will have to pip install scilog in the bec_venv to be able to send printouts to scilog from the command line. Within a new terminal:

cd ~/Data10/software
source bec_venv/bin/activate
pip install scilog

Device config from csaxs-bec plugins

bec.config.update_session_with_file('/sls/X12SA/data/e20639/Data10/software/csaxs-bec/bec_plugins/configs/bec_device_config_sastt.yaml')
bec.config.save_current_session('~/Data10/software/current_config.yaml')

The second command is helpful if you adjust limits of motors, which will then be stored in the config and loaded if a reload of the configuration is needed.

BEC commands

A number of commands that are useful:

To move devices that are added in the config:

umv(dev.samx, 0) #absolute
umvr(dev.samx, 0) #relative
dev.samx.wm #print motor position and limits
dev.samx.limits = [low_limit, high_limit] # To set limits, note, same lower and higher limit, e.g. [0, 0] means no limits!!

Scans:

scans.acquire(exp_time = 0.5, frames_per_trigger=10, readout_time=3e-3) # equivalent to a loopscan 30 0.5
scans.line_scan(dev.samx, -1, 1, steps=20, exp_time=0.5, readout_time=3e-3, relative=True) # optional, add frames_per_trigger =10 for burst acquisition at each step
#Scan 2 motors in a step scan at the same time
scans.line_scan(dev.samx, -1, 1, dev.samy, -1, 1, steps=20, exp_time=0.5, readout_time =3e-3, relative=True) # step scan with 20 steps, again frames_per_trigger can be added for burst at each point
scans.sgalil_grid(start_y = , end_y = , interval_y = , start_x=, end_x=, interval_x =, exp_time=0.5, readout_time=3e-3, relative=True)
S
Description
cSAXS specific plugins and configs for BEC
Readme BSD-3-Clause
27 MiB
Languages
Python 98.7%
HTML 0.8%
TeX 0.5%