This note shows how to work with private calibration constants.

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. For test purpose it is important to work with "private" constants which would not disturb any regular data processing. 

Regular DB

Calibration constant on MongoDB server are grouped in databases identified by their names

for example

Private DB

Private DB is organized the same way as detector DB, but its name is extended with custom "dbsuffix".

for example

To deploy and access calibration constants one has to specify this optional parameter --dbsuffix.

Add constants to the private DB

Constants can be deployed with regular deployment commands appended with additional parameter --dbsuffix <unique-string-name>

for example

Use private constants

Example script to use private DB

ds = DataSource(exp='rixx45619', run=121, dbsuffix='mytestdb')
det = run.Detector('epixhr')
arr = det.raw.calib(evt)
img = det.raw.image(evt)

References