fix: updated readme.md with notes on operation
This commit is contained in:
@@ -1,3 +1,145 @@
|
||||
# cSAXS BEC
|
||||
|
||||
cSAXS specific plugins and configs for 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
|
||||
|
||||
1. Clone cSAXS BEC repository into e-account (e.g. into ~/Data10/software/.)
|
||||
2. Install BEC
|
||||
3. Start Epics iocs
|
||||
4. Start BEC, BEC server and load/modify the device config with relevant hardware
|
||||
5. BEC commands
|
||||
6. Troubleshooting and common problems
|
||||
|
||||
## 1. Clone cSAXS BEC repository
|
||||
|
||||
Clone the current cSAXS BEC repository from GIT into the new e-account.
|
||||
Create directory
|
||||
```bash
|
||||
mkdir ~/Data10/software
|
||||
cd ~/Data10/software
|
||||
```
|
||||
Clone repository
|
||||
```bash
|
||||
git clone https://gitlab.psi.ch/bec/csaxs-bec.git
|
||||
```
|
||||
|
||||
## 2. Install BEC
|
||||
|
||||
There is a bash sript in the followin directory.
|
||||
Go to the directory and run the script on pc15543 logged in as the e-account (BEC server):
|
||||
```bash
|
||||
ssh pc15543
|
||||
cd ~/Data10/software/csaxs-bec/bin/
|
||||
./setup_bec.sh
|
||||
```
|
||||
## 3. 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:
|
||||
``` bash
|
||||
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
|
||||
``` bash
|
||||
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:
|
||||
``` bash
|
||||
ssh gac-x12sa@localhost
|
||||
cd ~/Software/Eiger/
|
||||
./launch_ioc
|
||||
```
|
||||
### Pilatus_2
|
||||
|
||||
First, start the cam server.
|
||||
Connect to the computer and follow the instructions printed after connecting:
|
||||
``` bash
|
||||
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:
|
||||
``` bash
|
||||
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:
|
||||
``` bash
|
||||
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)
|
||||
|
||||
## 4. 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:
|
||||
``` bash
|
||||
cd ~/Data10/software
|
||||
source bec_venv/bin/activate
|
||||
bec-server start
|
||||
tmux attach -t bec
|
||||
```
|
||||
|
||||
Open another teminal on pc15543 and start BEC:
|
||||
``` bash
|
||||
bec
|
||||
```
|
||||
|
||||
Device config from csaxs-bec plugins
|
||||
```bash
|
||||
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')
|
||||
```
|
||||
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.
|
||||
|
||||
## 5. BEC commands
|
||||
|
||||
A number of commands that are useful:
|
||||
|
||||
To move devices that are added in the config:
|
||||
```bash
|
||||
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:
|
||||
```bash
|
||||
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)
|
||||
```
|
||||
|
||||
## 6. Troubleshooting and common problems
|
||||
|
||||
Sometimes the data backend for the Eiger gets stuck or misses frames, this will result in an error
|
||||
``` python
|
||||
raise EigerTimeoutError(
|
||||
ophyd_devices.epics.devices.eiger9m_csaxs.EigerTimeoutError: Reached timeout with detector state 1, std_daq state FINISHED and received frames of 100 for the file writer)
|
||||
```
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user