KCWI Configuration Manager
KCWI uses a new system to create a unified data flow that includes instrument configurations, calibrations, and calibration association.
The basic principle is illustrated in these two figures.

Three new global server keywords keep track of the name of the current loaded configuration (which is user defined), of the TAC assigned program ID. A third keyword (STATEID) is automatically generated by the database and it contains a unique ID to avoid the cases in which two configuration s have the same name. As usual for KCWI, server keywords have an assigned module function (Global.py), and can be set directly using scripts. Both the functions and the scripts have the same names. These new keywords are part of the save_state script.
During normal operations, the user will create a new instrument configuration using the web interface (the Configuration Manager) and the configuration manager will produce state files when needed. Those state files can be used either by the configuration script to automatically calibrate the instrument, and directly executed at night to run scientific observations.
The configuration manager looks like this:

and it is accessed at the address http://localhost:5001
The icons on the right are:
- Detector parameters
- Calibration unit parameters
- Edit configuration
- Duplicate configuration
- Delete configuration
- Generate state file (it goes in the current outdir)
- Execute configuration (changes instrument setup)
If you already have a state file, you can load it with the browse button. The file MUST contain two of the three keywords listed above (STATENAM, PROGNAME). The STATEID will be generated automatically.