This note describes calibration constants Data Base for LCLS-II.
Intro
In LCLS-II calibration constants resides in the data bases. Access to the DB can be done through python API, CLI, and GUI. At regular deployment calibration constants goes in two databases designated for experiment and for detector. In regular request for calibration constants experimental DB is addressed first, then if constants not found, the detector DB is included in search. These features are sufficient for regular operations with detectors.
Calibration DB names
Calibration constants on MongoDB server are grouped in databases identified by their names
- cdb_<experiment-name>
- cdb_<detector-name>
for example
- cdb_rixx45619
- cdb_epixhr2x2_000001
Add constants to the DB
Constants can be deployed with commands cdb and epix10ka_deploy_constants, see for detail in psana environment:
- cdb -h
- epix10ka_deploy_constants -h
for example
- cdb add -e rixx45619 -d epixhr2x2_000001 -t 2021-10-01T00:00:00-0800 -c pedestals -f mypeds
- cdb add -e rixx45619 -d epixhr2x2_000001 -t 2021-10-01T00:00:00-0800 -c geometry -f mygeo -i txt
- epix10ka_deploy_constants -e rixx45619 -d epixhr -r121 -D
DB management tool
Browsing and management of constants in calibration DB can be done with command
launching multipurpose GUI application.
Get corrected data
Example of script to get raw and corrected data in psana environment:
from psana import DataSource ds = DataSource(exp='rixx45619', run=121) det = run.Detector('epixhr') raw = det.raw.raw(evt) arr = det.raw.calib(evt) img = det.raw.image(evt)
Direct access to calibration constants
For details see Area Detector Interface - Calibration Constants
All detector calibration constants (np.array) and associated metadata (dict) are available through the dictionary det.calibconst with calibration type as a key. For example,
|
Possible calibration types: pedestals, pixel_status, pixel_rms, pixel_gain, pixel_mask,
etc.
References
- Area Detector Interface
- Private Calibration Constants
- psdm_mongo_ws
- API access to the LCLS2 eLog
- ex10-web-iface-murali.py
- Python Classes for Configuration Management in MongoDB
- cdb - CLI for management of calibration DB
- epix10ka_deploy_constants - deployment of calibration constants for epix10ka type of detector.