General remarks

Forth and back conversion of constants may change the geometry file constants dramatically for a few reasons

  • constants may be presented in different coordinate frames
  • in the initial file segments may or not be grouped in quads, but in the final file all segments are "flatten" inside the detector.
  • panel, quads, etc. offsets and tilts may be interchangeable.

These circumstances does not allow to perform generic test of the converter. Tests listed below were made in a specific conditions

  • converter does not change coordinate frame (--cframe 0)
  • initial detector geometry description is done in a simplest way - panels inserted directly in the detector ignoring quads etc.
  • detector position in (x,y) is (0,0) to prevent re-distribution of this offset in segment geometry

Tests listed below show that initial psana geometry file survives forth and back transformation to CrystFEL with minimal variation of parameters due to final precision of saved constants.

Alternative but not so convincing test can be done using comparison of the graphical images reconstructed from any initial and double-converted geometry file.

Test for a few detectors

CSPAD

Panel type SENS2X1:V1 describes cspad 2x1 panel geometry in psana. There are two types of cspad detectors, xpp- and cxi-like, w/o and with quads, which has different configuration both in psana and CrystFEL.

  cp /reg/g/psdm/detector/data_test/geometry/geo-cspad-test.data .
  geometry_convert -f geo-cspad-test.data -o geo-cspad-test-cframe-psana.geom --cframe 0
  geometry_convert -d cspadv2 -f geo-cspad-test-cframe-psana.geom -o geo-cspad-test-back.data
  geometry_image -g geo-cspad-test.data -a /reg/g/psdm/detector/data_test/npy/nda-mfx11116-r0624-e005365-MfxEndstation-0-Cspad-0-max.txt -R10 -i0

epix10ka2m

Panel types

  cp /reg/g/psdm/detector/data_test/geometry/geo-epix10ka2m-test.txt .
  geometry_convert -f geo-epix10ka2m-test.txt -o geo-epix10ka2m-test-cframe-psana.geom --cframe 0
  geometry_convert -d epix10ka -f geo-epix10ka2m-test-cframe-psana.geom -o geo-epix10ka2m-test-back.txt
  then see the minor difference between geo-epix10ka2m-test.txt and geo-epix10ka2m-test-back.txt
  or check image with each of geometry files:
  geometry_image -g geo-epix10ka2m-test-back.txt -a /reg/g/psdm/detector/data_test/npy/nda-mfxc00118-r0184-epix10ka2m-silver-behenate-max.txt -R10 -i0

jungfrau

There may be two segment types Jungfrau:V1 and Jungfrau:V2 which represent the same panel from two sides. Forward test works for both types, backward returns panels of the Jungfrau:V2 type - front side.

  cp /reg/g/psdm/detector/data_test/geometry/geo-jungfrau-8-test.data .
  geometry_convert -f geo-jungfrau-8-test.data -o geo-jungfrau-8-test-cframe-psana.geom --cframe 0
  geometry_convert -d jungfrau -f geo-jungfrau-8-test-cframe-psana.geom -o geo-jungfrau-8-test-back.data
  geometry_image -g geo-jungfrau-8-test.data -a /reg/g/psdm/detector/data_test/npy/nda-cxilv9518-r0008-jungfrau-lysozyme-max.npy -R10 -i0

pnccd

A waste majority of pnccd geometry files in psana use old-style segment description as PNCCD:V1 with matrix coordinate reference frame. Forward conversion from psana-to-CrystFEL naturally supports this format. However, this format is not convenient for uniform backward conversion from CrystFEL-to-psana the arbitrary Cartesian frame. Backward conversion use segment description as MTRX:V2 in output file. The same segment type can be used in the conversion from psana-to-CrystFEL, but all geometry constants for panel position and orientation needs to be changed.  This issue creates a mess in direct comparison between original   and forth-and-back converted geometry file. For now this type of test is unavailable.

Conversion from psana-to-CrystFEL was tested long time ago and presumably works.

Reference


  • No labels