Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Currently -o,--dirrepo is set to /reg/g/psdm<PATHREPO>/detector/calib/geometry/

Code Block
titleCurrent content of --dirrepo
collapsetrue
(ana-4.0.37) [<username>@psanagpu106:<PATHREPO>/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

...

Code Block
titlePopulation of the directory epix10ka2m
collapsetrue
/reg/g/psdm<PATHREPO>/detector/calib/geometry]$ ls -l1 epix10ka2m
total 68
-rw-r--r-- 1 dubrovin br 3662 Mar 22 13:16 2018-11-15-geometry-epix10ka2m.txt
-rw-r--r-- 1 dubrovin br 3720 Mar 22 13:15 2020-02-25-geometry-epix10ka2m.1-v0-z0.txt
-rw-r--r-- 1 dubrovin br 3350 Mar 22 13:15 2020-02-25-geometry-epix10ka2m.1-v1-mfxc00118-0044-z0.txt
-rw-r--r-- 1 dubrovin br 3355 Mar 22 13:14 2020-02-25-geometry-epix10ka2m.1-v1-mfxc00318-0013-z0.txt
-rw-r--r-- 1 dubrovin br 3268 Mar 22 13:15 2020-06-25-geometry-epix10ka2m.0-v1.txt
-rw-r--r-- 1 dubrovin br 3424 Mar 22 13:14 2020-09-10-geometry-epix10ka2m.1-v1-cortilt-center.txt
-rw-r--r-- 1 dubrovin br 3340 Mar 22 11:12 2021-02-02-geometry-epix10ks2m.1-recentred-for-psana.txt
-rw-r--r-- 1 dubrovin br 3267 Mar 22 11:12 2021-02-02-geometry-epix10ks2m.1.txt
-rw-r--r-- 1 dubrovin br 3355 Mar 22 13:21 epix10ka2m_default.data
lrwxrwxrwx 1 dubrovin br   42 Mar 22 10:50 epix10ka2m_MfxEndstation-0-Epix10ka2M-0_20200225.data -> 2020-02-25-geometry-epix10ka2m.1-v0-z0.txt
lrwxrwxrwx 1 dubrovin br   54 Mar 22 10:55 epix10ka2m_MfxEndstation-0-Epix10ka2M-0_20200910.data -> 2020-09-10-geometry-epix10ka2m.1-v1-cortilt-center.txt
lrwxrwxrwx 1 dubrovin br   56 Mar 22 13:09 epix10ka2m_MfxEndstation-0-Epix10ka2M-0_20210202.data -> 2021-02-02-geometry-epix10ks2m.1-recentred-for-psana.txt
lrwxrwxrwx 1 dubrovin br   34 Mar 22 10:43 epix10ka2m_XcsEndstation-0-Epix10ka2M-0_20181115.data -> 2018-11-15-geometry-epix10ka2m.txt
lrwxrwxrwx 1 dubrovin br   39 Mar 22 10:45 epix10ka2m_XppGon-0-Epix10ka2M-0_20200625.data -> 2020-06-25-geometry-epix10ka2m.0-v1.txt

...

If geometry file for specified detector and time-stamp is missing, constants from <dettype>_default.data will be loaded.

Troubleshooting

From log-file or dump on terminal

Remarks

Default geometry modification

Command parameters allow to make a few modifications to the default geometry file before deployment. These modifications include detector position and orientation and Rayonix segment binning.

Position and orientation

Camera position and orientation parameters (--posx/y/z, and --rotx/y/z) are included in the geometry file line beginning with "IP" (which by default set in by parameter --parent IP). It is assumed that all files in repository should have the line beginning with "IP". Otherwise, parameter --parent can be changed.

Rayonix binning

Default geometry file for Rayonix <PATHREPO>/detector/calib/geometry/rayonix/rayonix_default.data has pre-defined segment description like MTRX:V2:3840:3840:44.5:44.5, that can be changed by experiment dependent binning. For detector of type rayonix this string parameters are compared with parameters from configuration object for specified experiment (-e EXP, --exp EXP) and run number (-r RUN, --run RUN). Segment binning values from configuration are substituted, e.g. for xpptut15 run 240 this line is replaced with MTRX:V2:1920:1920:88:88. For backward compatibility of already deployed geometry files similar check and substitution is done on flight at geometry loading in the Detector.geoaccess, check_rayonix_geo methods (requested by Chuck).

Troubleshooting

From log-file or dump on terminal

Code Block
titleexample of script
Code Block
titleexample of script output
collapsetrue
(ana-4.0.37) [dubrovin@psanagpu106:~/LCLS/con-py2]$ geometry_deploy_constants -e xpptut15 -r 460 -d MecTargetChamber.0:Cspad2x2.3 -D -c ./calib --posz -100000 --posx 10 --posy -20 --rotz 90
Arguments: Namespace(deploy=True, det='MecTargetChamber.0:Cspad2x2.3', dircalib='./calib', dirmode=511, dirrepo='/reg/g/psdm/<PATHREPO>/detector/calib/geometry/', dsname=None, dssuffix=None, exp='xpptut15', filemode=438, loglev='INFO', parent='IP', posx=10.0, posy=-20.0, posz=-100000.0, rotx=0, roty=0, rotz=90.0, run='460', runrange='0-end', tstamp=None)

[I] geometry_deploy_constants L0131 log file: <PATHREPO>/reg/g/psdm/detector/calib/geometry/logs/2022/2022-03-25T104317_log_geometry_deploy_constants_dubrovin.txt
[I] UtilsCalib.py L0305 record at start: 
2022-03-25T10:43:17 user:dubrovin@psanagpu106 cwd:/cds/home/d/dubrovin/LCLS/con-py2 rel:ana-4.0.37 dirrepo:/reg/g/psdm/<PATHREPO>/detector/calib/geometry command:/cds/home/d/dubrovin/LCLS/con-py2/arch/x86_64-rhel7-gcc48-opt/bin/geometry_deploy_constants -e xpptut15 -r 460 -d MecTargetChamber.0:Cspad2x2.3 -D -c ./calib --posz -100000 --posx 10 --posy -20 --rotz 90
saved in: /reg/g/psdm/<PATHREPO>/logs/atstart/2022/2022_lcls1_geometry_deploy_constants.txt
[I] UtilsGeometryDeploy.py L0032 input parameters
          roty : 0
          rotx : 0
       dirrepo : <PATHREPO>/reg/g/psdm/detector/calib/geometry/
          rotz : 90.0
           run : 460
           exp : xpptut15
        parent : IP
        deploy : True
           det : MecTargetChamber.0:Cspad2x2.3
          posy : -20.0
        dsname : None
      dircalib : ./calib
        tstamp : None
        loglev : INFO
      dssuffix : None
       dirmode : 511
          posx : 10.0
      filemode : 438
          posz : -100000.0
      runrange : 0-end
       repoman : <Detector.UtilsCalib.RepoManager object at 0x7f9443b06350>
[I] UtilsGeometryDeploy.py L0054 open dataset exp=xpptut15:run=460
[I] UtilsGeometryDeploy.py L0065 directory for dettype: /reg/g/psdm<PATHREPO>/detector/calib/geometry/cspad2x2
[I] UtilsGeometryDeploy.py L0070 list of found in repository geometry files for dettype_detname: cspad2x2_MecTargetChamber-0-Cspad2x2-3
  cspad2x2_MecTargetChamber-0-Cspad2x2-3_20130213.data
  cspad2x2_MecTargetChamber-0-Cspad2x2-3_20150402.data
  cspad2x2_MecTargetChamber-0-Cspad2x2-3_20140425.data
[I] UtilsGeometryDeploy.py L0076 file_for_timestamp(tsrun=20130428): <PATHREPO>/reg/g/psdm/detector/calib/geometry/cspad2x2/cspad2x2_MecTargetChamber-0-Cspad2x2-3_20130213.data
[I] UtilsGeometryDeploy.py L0086 geo_det: parent:        IP  0   geo: CSPAD2X2:V1  0  x0:       0  y0:       0  z0:-1000000  rot_z:   0.000  rot_y:   0.000  rot_x:   0.000  tilt_z: 0.00000  tilt_y: 0.00000  tilt_x: 0.00000
[I] UtilsGeometryDeploy.py L0095 geo_det updated: parent:        IP  0   geo: CSPAD2X2:V1  0  x0:      10  y0:     -20  z0: -100000  rot_z:  90.000  rot_y:   0.000  rot_x:   0.000  tilt_z: 0.00000  tilt_y: 0.00000  tilt_x: 0.00000
[I] GeometryAccess.py L0263 Save file: /reg/g/psdm<PATHREPO>/detector/calib/geometry/cspad2x2/cspad2x2_tmp.data
[I] UtilsGeometryDeploy.py L0104 standard calib dir: /reg/d/psdm<PATHREPO>/XPP/xpptut15/calib
[I] UtilsGeometryDeploy.py L0105 non-default calib dir: ./calib
[I] UtilsGeometryDeploy.py L0114 deploy calib file <PATHREPO>/reg/g/psdm/detector/calib/geometry/cspad2x2/cspad2x2_tmp.data under ./calib/CsPad2x2::CalibV1/MecTargetChamber.0:Cspad2x2.3/geometry
create_path: ./calib/CsPad2x2::CalibV1/MecTargetChamber.0:Cspad2x2.3/geometry/0-end.data
Directory exists: .
Directory exists: ./calib
Directory exists: ./calib/CsPad2x2::CalibV1
Directory exists: ./calib/CsPad2x2::CalibV1/MecTargetChamber.0:Cspad2x2.3
Directory exists: ./calib/CsPad2x2::CalibV1/MecTargetChamber.0:Cspad2x2.3/geometry
cmd: cat /reg/g/psdm<PATHREPO>/detector/calib/geometry/cspad2x2/cspad2x2_tmp.data > ./calib/CsPad2x2::CalibV1/MecTargetChamber.0:Cspad2x2.3/geometry/0-end.data
cmd: echo "file:0-end.data     copy_of:/reg/g/psdm/detector/calib/geometry/cspad2x2/cspad2x2_tmp.data ctype:geometry user:dubrovin host:psanagpu106 cptime:2022-03-25T10:43:18 cwd:/cds/home/d/dubrovin/LCLS/con-py2 cmt:" >> ./calib/CsPad2x2::CalibV1/MecTargetChamber.0:Cspad2x2.3/geometry/HISTORY
(ana-4.0.37) [dubrovin@psanagpu106:~/LCLS/con-py2]$

...

  • script grabs expected file for requested detector and time-stamp
  • check if the geometry file in its final destination under the calib/ directory is available and not empty
  • please report about any issues

References