You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 2 Next »

Content

Overview

This note extends Jungfrau and Epix10ka Calibration for specific commands to produce calibration constants. These commands work with all epix10ka composite detectors from single-panel to 4-panel quad and 16-panel epix10ka2m.

Scripts

There are three major scripts intended for production of intensity correction constants:

scripts to generate intensity correction constants
epix10ka_offset_calibration -h     # done more rarely by psana/detector experts on 103-calib-cycle dark + charge injection runs
epix10ka_pedestals_calibration -h  # done quite often on 5-calib-cycle dark runs
epix10ka_deploy_constants -h       # merges per-panel-per-gain-range constants in full scale calibration files of shape (7, <number-of-panels>, 352, 384)

NOTE: The "-h" option for all commands shows common example syntax, as well as descriptions of parameters.

These commands can be executed in psana (1) environment.

Example of commands

Examples assume that processing is done on 2020-07-14 on run 80 or 92. These parameters needs to substututed for real in actual processing.

Offset calibration

Script epix10ka_offset_calibration works on special runs containing 103 calib-cycles =  5 dark + 2 x (7x7) charge injection.

Processing time of this file is quite long, so it is split for panels, which can be run in parallel, that still takes ~1hour 30min.

List of commands to process all panels in batch:

bsub -o 2020-07-14-r92-offset-log00 -q psanaq epix10ka_offset_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r92 -i0  -p
bsub -o 2020-07-14-r92-offset-log01 -q psanaq epix10ka_offset_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r92 -i1  -p
bsub -o 2020-07-14-r92-offset-log02 -q psanaq epix10ka_offset_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r92 -i2  -p
bsub -o 2020-07-14-r92-offset-log03 -q psanaq epix10ka_offset_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r92 -i3  -p
bsub -o 2020-07-14-r92-offset-log04 -q psanaq epix10ka_offset_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r92 -i4  -p
bsub -o 2020-07-14-r92-offset-log05 -q psanaq epix10ka_offset_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r92 -i5  -p
bsub -o 2020-07-14-r92-offset-log06 -q psanaq epix10ka_offset_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r92 -i6  -p
bsub -o 2020-07-14-r92-offset-log07 -q psanaq epix10ka_offset_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r92 -i7  -p
bsub -o 2020-07-14-r92-offset-log08 -q psanaq epix10ka_offset_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r92 -i8  -p
bsub -o 2020-07-14-r92-offset-log09 -q psanaq epix10ka_offset_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r92 -i9  -p
bsub -o 2020-07-14-r92-offset-log10 -q psanaq epix10ka_offset_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r92 -i10 -p
bsub -o 2020-07-14-r92-offset-log11 -q psanaq epix10ka_offset_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r92 -i11 -p
bsub -o 2020-07-14-r92-offset-log12 -q psanaq epix10ka_offset_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r92 -i12 -p
bsub -o 2020-07-14-r92-offset-log13 -q psanaq epix10ka_offset_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r92 -i13 -p
bsub -o 2020-07-14-r92-offset-log14 -q psanaq epix10ka_offset_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r92 -i14 -p
bsub -o 2020-07-14-r92-offset-log15 -q psanaq epix10ka_offset_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r92 -i15 -p

To preserve batch log files for references in future please copy them by command:

cp 2020-07-14-r92-offset-log* /reg/g/psdm/detector/gains/epix10k/panels/logs/

If everything in log files looks fine, they have the same size, then per-panel-per-gain-range constants needs to be merged and deployed.

Pedestal calibration

Script epix10ka_pedestals_calibration works on special runs containing 5 dark calib-cycles.

To speed-up processing commands are split for 5 calib-cycles. Processing time is a few minutes per gain range so script can be run interactively or in batch.

Interactive commands:

commands for interactive processing of 5 calib-cycle dark runs
epix10ka_pedestals_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r80 -c 0 &> 2020-07-14-r80-cc0-log-epix10ka-pedestals-calibration&
epix10ka_pedestals_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r80 -c 1 &> 2020-07-14-r80-cc1-log-epix10ka-pedestals-calibration&
epix10ka_pedestals_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r80 -c 2 &> 2020-07-14-r80-cc2-log-epix10ka-pedestals-calibration&
epix10ka_pedestals_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r80 -c 3 &> 2020-07-14-r80-cc3-log-epix10ka-pedestals-calibration&
epix10ka_pedestals_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r80 -c 4 &> 2020-07-14-r80-cc4-log-epix10ka-pedestals-calibration& 

Similar batch commands:

commands for batch processing of 5 calib-cycle dark runs
bsub -o 2020-07-14-r80-cc0-log-epix10ka-pedestals-calibration -q psanaq epix10ka_pedestals_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r80 -c 0
bsub -o 2020-07-14-r80-cc1-log-epix10ka-pedestals-calibration -q psanaq epix10ka_pedestals_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r80 -c 1
bsub -o 2020-07-14-r80-cc2-log-epix10ka-pedestals-calibration -q psanaq epix10ka_pedestals_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r80 -c 2
bsub -o 2020-07-14-r80-cc3-log-epix10ka-pedestals-calibration -q psanaq epix10ka_pedestals_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r80 -c 3
bsub -o 2020-07-14-r80-cc4-log-epix10ka-pedestals-calibration -q psanaq epix10ka_pedestals_calibration -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r80 -c 4


Then preserve log files:

cp 2020-07-14-r80-cc*-log-epix10ka-pedestals-calibration /reg/g/psdm/detector/gains/epix10k/panels/logs/

If everything in log files looks fine, they have the same size, then per-panel-per-gain-range constants needs to be merged and deployed.

Merging and deployment

Script epix10ka_deploy_constants merges per-panel-per-gain-range constants in full scale calibration files of shape (7, <number-of-panels>, 352, 384) and deploys them under experiment calib directory.

Execution time is a few minutes, so everything can be done interactively.

Command:

cammand for merging and deployment of calibration constants
epix10ka_deploy_constants -e detdaq18 -d DetLab.0:Epix10ka2M.0 -r92 -D -p psrc &> 2020-07-14-r92-log-epix10ka-deploy-constants

Parameter "-p psrc" specifies what constants need to be saved, where "c" stands for charge injection gains (see help).

Preserve log file:

cp 2020-07-14-r92-offset-log* /reg/g/psdm/detector/gains/epix10k/panels/logs/

References

 

  • No labels