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

Compare with Current View Page History

Version 1 Next »

Population of the calibration store with constants is a significant issue for instrument scientists and users.

Code

Essential code is implemented unde the Detector package in modules app/deploy_constants and src/UtilsDeployConstants.py

Command

In psana environment on any psana node (with access to data) use command

deploy_constants -h

deploy_constants -e output on 2022-06-09
(ana-4.0.42) [dubrovin@psanagpu105:~/LCLS/con-py2]$ deploy_constants -h
usage: 
deploy_constants -e <experiment> -d <detector> -r <run-number> -C <calib-type> [-D] [-L <logging-mode>] [...]

REGULAR COMMAND EXAMPLE:
  deploy_constants -e xpptut15 -r 260 -d XcsEndstation.0:Epix100a.1 -C gain -D -c ./calib -D --runrange 10-20

  Input parameters to select dataset:                     # DataSource argument:
    -e xpptut15 -r 260                                      # exp=xpptut15:run=260
    -e xpptut15 -r 260 -s :smd                              # exp=xpptut15:run=260:smd
    -e xpptut15 -r 260 -s :dir=path/xtc::stream=0-79        # exp=xpptut15:run=260:dir=path/xtc::stream=0-79
    -x /cds/data/drpsrcf/mfx/mfxlv4920/xtc/<file-name.xtc>  # /cds/data/drpsrcf/mfx/mfxlv4920/xtc/<file-name.xtc>

TEST COMMANDS:
Ex.1  for epix100a     : deploy_constants -e xpptut15 -r 260 -d XcsEndstation.0:Epix100a.1 -C gain -D -c ./calib
Ex.2  for Cspad CXI    : deploy_constants -e xpptut15 -r 380 -d CxiDs1.0:Cspad.0 -C gain -D -c ./calib
Ex.3  for Cspad CXI    : deploy_constants -e xpptut15 -r 380 -d CxiDs2.0:Cspad.0 -C gain -D -c ./calib
Ex.4  for Cspad XPP    : deploy_constants -e xpptut15 -r 320 -d XppGon.0:Cspad.0 -C gain -D -c ./calib
Ex.5  for cspad2x2     : deploy_constants -e xpptut15 -r 460 -d MecTargetChamber.0:Cspad2x2.3 -C gain -D -c ./calib
Ex.6  for pnCCD        : deploy_constants -e xpptut15 -r 450 -d Camp.0:pnCCD.1 -C gain -D -c ./calib

Help:  deploy_constants -h

Deployment of calibration parameters

optional arguments:
  -h, --help            show this help message and exit
  -e EXP, --exp EXP     experiment name, default = None
  -d DET, --det DET     detector name, default = None
  -r RUN, --run RUN     run number of the existing dataset to get run time-
                        stamp, detector full name etc., default = None
  -t TSTAMP, --tstamp TSTAMP
                        non-default time stamp (YYYYmmddHHMMSS) to search for
                        constants in repo. By default run time is used,
                        default = None
  -s DSSUFFIX, --dssuffix DSSUFFIX
                        dataset name suffix beyond
                        exp=<expname>:run=<runnum><dssuffix>, for example
                        ":smd:dir=<path>/xtc/", default = None
  -x DSNAME, --dsname DSNAME
                        overrides exp=<expname>:run=<runnum><dssuffix> if
                        specified, e.g. path to *.xtc file, default = None
  -o DIRREPO, --dirrepo DIRREPO
                        non-default repository of calibration results, default
                        = /reg/g/psdm/detector/calib/constants/
  -c DIRCALIB, --dircalib DIRCALIB
                        non-default deployment calib directory, different from
                        standard one, default = None
  -C CTYPE, --ctype CTYPE
                        calibration type [gain, common_mode, etc.], default =
                        gain
  -l LOGLEV, --loglev LOGLEV
                        logging mode, one of INFO, CRITICAL, WARN, WARNING,
                        ERROR, DEBUG, NOTSET, default = INFO
  --dirmode DIRMODE     mode for all mkdir, default = 511
  --filemode FILEMODE   mode for all saved files, default = 438
  -D, --deploy          deploy constants to the calib dir, default = False
  -R RUNRANGE, --runrange RUNRANGE
                        validity run range for output calibration file,
                        default = 0-end

Repository

References

  • No labels