|
|
|
|
|
# Repository
|
|
|
|
|
|
IEXcode => Beamline controls:
|
|
|
[https://git.aps.anl.gov/29id/iexcode](https://git.aps.anl.gov/29id/iexcode)
|
|
|
|
|
|
IEXplot and orangebook:
|
|
|
[https://github.com/apsIEX](https://github.com/apsIEX)
|
|
|
|
|
|
|
|
|
# Installation
|
|
|
|
|
|
Code has been cloned here:
|
|
|
```
|
|
|
cd /home/beams/29IDUSER/Documents/User_Folders/Staff/python_workspace
|
|
|
git clone <copy link from repository>
|
|
|
|
|
|
cd <folder>
|
|
|
pip install .
|
|
|
```
|
|
|
|
|
|
To set up ipython config/profile see [here](https://git.aps.anl.gov/groups/29id/-/wikis/IEXcode/ipython-config).
|
|
|
|
|
|
|
|
|
# Logical flow
|
|
|
|
|
|
We want a shell script to start jupyter/ipython with for a given endstation. Depending on initialization the xrays=True the beamline functions are imported and additional detector fields of the scanRecord are populated.
|
|
|
|
|
|
## package structure
|
|
|
- instruments: modularized files for various equipment, scanRecord and Motor classes, endstation and xray .py files
|
|
|
- IEX dictionaries: dictionaries used by instrument files
|
|
|
- macros: startoftheweek, alignment scripts, quick plots
|
|
|
|
|
|
### Classes:
|
|
|
- Beamline_Config: class which is stored in cfg.BL and holds all the meta data which is used for running the beamline and needs to be initialized when python is started. Typically this is done in the endstation_init function (e.g. ARPES.ARPES_init) which is called as part of the startup. But by hand can be done as
|
|
|
```
|
|
|
import iexcode.instruments.cfg as iex
|
|
|
from IEX_beamline_config.endstation import Beamline_Config
|
|
|
|
|
|
iex.BL = Beamline_Config(endstation_name,scan_ioc,xrays,user_mode)
|
|
|
```
|
|
|
- ScanRecord:This object which holds all the meta data used for accessing the scanRecord and for logging.
|
|
|
Typically initialized by Beamline_Config and stored in cfg.BL.mda
|
|
|
|
|
|
Can be initalized by ScanRecord(scan_ioc), where scan_ioc is the string for the full ioc name with ':'
|
|
|
```
|
|
|
mda = scanRecord('29idTest:')
|
|
|
```
|
|
|
- Logfile: This object which holds all the meta data used for accessing the logging, usually initialized by Endstation
|
|
|
|
|
|
```
|
|
|
iex.BL.log
|
|
|
```
|
|
|
|
|
|
## adding a new endstation
|
|
|
1. Duplicate an endstation.py file (i.e. APRES.py/Kappa.py) and modify the functions as needed
|
|
|
2. Modify these additional files (search for 'For new endstation modify here:')
|
|
|
- Add endstation to IEX_beamline_config.endstation_list (above class definition)
|
|
|
- Add case to the folder/prefix determination in IEX_beamline_config.__init__
|
|
|
- Add dictionary entry to cameras._endstation_cams_enable
|
|
|
- Add dictionary entry to Logfile._name_pv
|
|
|
- if needed add function and case to scaler_cts counting |
|
|
\ No newline at end of file |