wiki/Web-app-startup.md
2024-09-06 13:17:48 +02:00

30 lines
1.9 KiB
Markdown

## Startup options on the web server
Several tools are being added to the web server to add efficient startups.
### Save and restore for camera settings
Without a save and restore tool for SwissFEL camera settings, this tool sets listed camera settings for **Basler** and **PCO edge** cameras. Please note setting the configuration will stop selected running cameras for around 1 second and overwrite current settings.
### Operation
The configuration restore script is set from https://sf-photodiag-test.psi.ch/ under the **Startup** tab. Cameras are grouped (e.g, Beamline Aramis, Beamline Athos.....), and by pressing the desired button all cameras under that group name are set **if their configuration file contains a `hardware_configuration` dictionary**
<img src="https://docs.google.com/drawings/d/138H9Jph71I3xpSsGuAYB4wlwvoDWJgVUTBsgNFMNrdo/pub?w=960&h=720">
### Camera group
The tool uses the existing `group` field in the camera configuration. This is how the cameras are group by the screen panel etc. Currently used groups are:
- Beamline Aramis
- Beamline Athos
Any group can be easily added to the tool.
### Database
After filtering by camera group, the tool uses the camera configuration files on the camera server (accessible via CSM or API) as a database for the settings. Setting are contained in a dictionary called "hardware_configuration" in the camera configuration:
````
"hardware_configuration": {
"EXPOSURE": 9.9,
"HSSPEED": 1,
"REGIONX_START": 1,
"REGIONY_START": 500
},
````
where the item names are the suffix of the PV name of the camera PV to set. For example, for the camera `SARFE10-PSSS059` the item in the dictionary above `EXPOSURE` sets the PV `SARFE10-PSSS059:EXPOSURE` to 9.9. To add settings for a desired camera, simply add the dictionary (if not already present) to the camera config file and add the items that should be restored.