https://github.com/slaclab/lcls-live
Tools for running the LCLS live accelerator models
https://github.com/slaclab/lcls-live
Last synced: about 1 year ago
JSON representation
Tools for running the LCLS live accelerator models
- Host: GitHub
- URL: https://github.com/slaclab/lcls-live
- Owner: slaclab
- License: apache-2.0
- Created: 2019-08-12T16:22:58.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2025-02-28T18:38:11.000Z (over 1 year ago)
- Last Synced: 2025-04-06T04:59:42.031Z (about 1 year ago)
- Language: Jupyter Notebook
- Homepage: https://slaclab.github.io/lcls-live/
- Size: 21.5 MB
- Stars: 4
- Watchers: 6
- Forks: 8
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# LCLS-Live
Tools for setting up the LCLS live models.
## Documentation
https://slaclab.github.io/lcls-live/
## EPICS proxy
This is to facilitate caching of EPICS values and offline usage. Basic usage:
```python
from LCLS.epics import epics_proxy
epics = epics_proxy('data/epics_cache.json')
val = epics.caget('some_pv_name')
vals = epics.caget_many(['pv', 'name', 'list'])
```
## Tao tooling
`lcls-live` is packaged with a command line tool for generating tao commands from live or archived EPICS process variables. This command may be executed using epics:
``` $ get-lcls-live --tao --beampath cu_hxr --source epics > cmd.tao```
And with archiver:
``` $ get-lcls-live --tao --beampath cu_hxr --source archiver --isotime '2021-04-21T08:10:25.000000-07:00' > cmd.tao```
At present the tool accomodates `--tao` or `--bmad` options for generating commands, `--beampath cu_hxr` or `--beampath cu_sxr`, `--source archiver` or `--source epics`.
### Epics remote environment
Access to production process variables requires setting of the `$CA_NAME_SERVER_PORT`, `$LCLS_PROD_HOST`, and `$SLAC_MACHINE`. The utility script `configure-epics-remote` is installed with `lcls-live`. The script will perform forward local connections to the `$CA_NAME_SERVER_PORT` to the `$LCLS_PROD_HOST` via a double hop ssh and will required entry of your SLAC password. The process will run in the background and will require manual kill, identifying the pid with `ps aux |grep ssh`.
```$ configure-epics-remote```
### Remote archiver environment
The remote archiver requires an ssh tunnel, which can be configured using the `configure-archiver-remote` script installed with lcls-live. This should be executed in a separate shell from the Tao command and the process allowed to continue for the duration of archiver use. The script requires setting the `$SLAC_ARCHIVER_HOST` and `$SLAC_USERNAME` environment variables.
```$ configure-archiver-remote```
## Datamaps
A utility notebook for generating datamaps is provided in `developer/build_datamaps.ipynb`. This constructs relevant datamaps using the `pytao` Tao interface and requires setting the `$LCLS_LATTICE` and `$ACC_ROOT_DIR`