Page History
Table of Contents |
---|
In multiMulti-panel composite detectors detector needs in geometry constants are required to get arrays of pixel 3-d coordinates and derived objects. Mapping of correct constants with specific detector is a big issue if it is done manually. This note is about script automating/simplifying this job.
...
To get current information about geometry constants deployment script and examples, use command:
geometry_deploy_constants -h
Code Block | ||||
---|---|---|---|---|
| ||||
(ana-4.0.37) [<username>@psanagpu106:~/LCLS/con-py2]$ geometry_deploy_constants -e xpptut15 -r 320 -d XppGon.0:Cspad.0 -D -c ./calib -h usage: geometry_deploy_constants -e <experiment> -d <detector> -r <run-number> [-D] [-L <logging-mode>] [...] REGULAR COMMAND EXAMPLE: geometry_deploy_constants -e cxilu9218 -d CxiDs1.0:Jungfrau.0 -r238 --posz -100000 --posx 0 --posy 0 --rotz 90 -D --runrange 10-20 TEST COMMANDS: Ex.1 for Cspad CXI : geometry_deploy_constants -e xpptut15 -r 380 -d CxiDs1.0:Cspad.0 -D -c ./calib Ex.2 for Cspad CXI : geometry_deploy_constants -e xpptut15 -r 380 -d CxiDs2.0:Cspad.0 -D -c ./calib Ex.3 for Cspad XPP : geometry_deploy_constants -e xpptut15 -r 320 -d XppGon.0:Cspad.0 -D -c ./calib Ex.4 for cspad2x2 : geometry_deploy_constants -e xpptut15 -r 460 -d MecTargetChamber.0:Cspad2x2.3 -D -c ./calib --posz -100000 --posx 10 --posy -20 --rotz 90 Ex.5 for jungfrau512k : geometry_deploy_constants -e xpptut15 -r 410 -d MfxEndstation.0:Jungfrau.1 -D -c ./calib Ex.6 for jungfrau1M : geometry_deploy_constants -e xpptut15 -r 430 -d MfxEndstation.0:Jungfrau.0 -D -c ./calib Ex.7 for jungfrau4M : geometry_deploy_constants -e xpptut15 -r 530 -d DetLab.0:Jungfrau.2 -D -c ./calib Ex.8 for epix10ka2m : geometry_deploy_constants -e xpptut15 -r 570 -d MfxEndstation.0:Epix10ka2M.0 -D -c ./calib Ex.9 for epix100a : geometry_deploy_constants -e xpptut15 -r 260 -d XcsEndstation.0:Epix100a.1 -D -c ./calib Ex.10 for pnCCD : geometry_deploy_constants -e xpptut15 -r 450 -d Camp.0:pnCCD.1 -D -c ./calib Ex.11 for epix10kaquad : geometry_deploy_constants -e xpptut15 -r 590 -d MecTargetChamber.0:Epix10kaQuad.0 -D -c ./calib Ex.12 for epix10kaquad : geometry_deploy_constants -e xpptut15 -r 590 -d MecTargetChamber.0:Epix10kaQuad.1 -D -c ./calib Ex.13 for epix10kaquad : geometry_deploy_constants -e xpptut15 -r 590 -d MecTargetChamber.0:Epix10kaQuad.2 -D -c ./calib Ex.14 for epix10kaquad : geometry_deploy_constants -e xpptut15 -r 590 -d MecTargetChamber.0:Epix10kaQuad.3 -D -c ./calib Help: geometry_deploy_constants -h Deployment of geometry 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) or run number(<10000) for constants selection 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/geometry/ -c DIRCALIB, --dircalib DIRCALIB deployment calib directory if different from standard one, default = None -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 --parent PARENT parent frame name containing the detector geometry object, default = IP --posx POSX detector position x[um] relative IP, default = 0.000000 --posy POSY detector position y[um] relative IP, default = 0.000000 --posz POSZ detector position z[um] relative IP, default = -100000.000000 --rotx ROTX detector rotation angle [degree] around axis x, default = 0.000000 --roty ROTY detector position angle [degree] around axis y, default = 0.000000 --rotz ROTZ detector position angle [degree] around axis z, default = 0.000000 |
...
Command geometry_deploy_constants <parameters> checks experiment (-e, –-exp) run (-r, –-run) information for requested detector (-d, –-det), finds the run time stamp, finds appropriate file with geometry constants in the repository (-o, --dirrepo), changes detector orientation, apply translation relative IP (if parameters --parent, --pos*, --rot* specified) and deploys constants under <experiment>/calib directory, or directory specified by parameter (-c, --calibdir). Results of this command, depending on parameter (-l, --loglev), are dumped on terminal and preserved in the logfile
<dirrepo>/logs/<year>/<time-stamp>_log_geometry_deploy_constants_<user-login-name>.txt
Repository
Conventions about repository containing files with geometry calibration constants.
Currently -o,--dirrepo is set to /reg/g/psdm/detector/calib/geometry/
Code Block | ||||
---|---|---|---|---|
| ||||
(ana-4.0.37) [<username>@psanagpu106:/reg/g/psdm/detector/calib/geometry]$ ls -l total 4 drwxr-xr-x 1 dubrovin br 0 Mar 22 14:13 andor drwxr-xr-x 1 dubrovin br 0 Mar 22 14:08 andor3d drwxrwxr-- 1 dubrovin br 0 Mar 24 11:30 cspad drwxrwxr-- 1 dubrovin br 0 Mar 24 11:55 cspad2x2 drwxrwxr-- 1 dubrovin br 0 Mar 24 12:00 epix100a drwxrwxr-- 1 dubrovin br 0 Mar 23 14:54 epix10ka drwxr-xr-x 1 dubrovin br 0 Mar 24 12:14 epix10ka2m drwxr-xr-x 1 dubrovin br 0 Mar 24 13:42 epix10kaquad drwxrwxr-- 1 dubrovin br 0 Mar 23 10:14 jungfrau drwxrwxrwx 1 dubrovin br 0 Mar 15 09:55 logs drwxrwxr-- 1 dubrovin br 0 Mar 17 15:02 pnccd drwxr-xr-x 1 dubrovin br 0 Mar 22 09:33 rayonix |
...
Script finds path to the geometry file using its name conventions:
<dirrepo>/<det-type>/<dettype>_<full-lcls1-detector-name>_<time-stamp>.data
where the time-stamp is presented in format YYYYMMDD (it is assumed that optical metrology or variation of geometry constants do not need to be changed more often than once per day...).
...