Versions Compared

Key

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

...

Report table about all deviations is generated by the python script processing the metrology file. Large deviations exceeding standard precision >3σ(RMS) indicate on problem with measurement. A few corrections are usually applied for each metrology file.

Calibration file

In this section we discuss requirements to the geometry alignment parameters and describe chosen file format.

...

CalibManager under the tabs Geometry / Metrology has a GUI which processes metrology file and generates the calibration file like shown below for CXI-like CSPAD with moving quads (see example of file: geometry/0-end.data)

Code Block
 

All lines started with hash “#” are comments, which are also accessible through the program interface as a dictionary. XPP-like CSPAD with all sensors attached to the same plate is measured as a single detector. Its content part omits quads

Code Block
 

Content of CSPAD2x2 geometry file consist of data for two sensors only:

Code Block
 
# TITLE      Geometry parameters of CSPAD-CXI
# DATE_TIME  2014-10-03 12:20:44 PDT
# METROLOGY  /reg/neh/home1/dubrovin/LCLS/CSPadMetrologyProc/2014-05-15-CSPAD-CXI-DS1-Metrology-corr.txt
# AUTHOR     dubrovin
# EXPERIMENT Any
# DETECTOR   CSPAD-CXI
# CALIB_TYPE geometry
# COMMENT:01 Table contains the list of geometry parameters for alignment of 2x1 sensors, quads, CSPAD, etc
# COMMENT:02 All translation and rotation pars of the object are defined w.r.t. parent object Cartesian frame
# PARAM:01 PARENT     - name and version of the parent object
# PARAM:02 PARENT_IND - index of the parent object
# PARAM:03 OBJECT     - name and version of the object
# PARAM:04 OBJECT_IND - index of the new object
# PARAM:05 X0         - x-coordinate [um] of the object origin in the parent frame
# PARAM:06 Y0         - y-coordinate [um] of the object origin in the parent frame
# PARAM:07 Z0         - z-coordinate [um] of the object origin in the parent frame
# PARAM:08 ROT_Z      - object design rotation angle [deg] around Z axis of the parent frame
# PARAM:09 ROT_Y      - object design rotation angle [deg] around Y axis of the parent frame
# PARAM:10 ROT_X      - object design rotation angle [deg] around X axis of the parent frame
# PARAM:11 TILT_Z     - object tilt angle [deg] around Z axis of the parent frame
# PARAM:12 TILT_Y     - object tilt angle [deg] around Y axis of the parent frame
# PARAM:13 TILT_X     - object tilt angle [deg] around X axis of the parent frame
 
# HDR PARENT IND        OBJECT IND    X0[um]  Y0[um]  Z0[um]   ROT-Z ROT-Y ROT-X     TILT-Z   TILT-Y   TILT-X
 
QUAD:V1        0  SENS2X1:V1     0     21757   33110      51       0     0     0    0.04474 -0.14079 -0.00274
QUAD:V1        0  SENS2X1:V1     1     21769   10457      18       0     0     0    0.01053 -0.11974  0.00000
QUAD:V1        0  SENS2X1:V1     2     33464   68275     -28     270     0     0   -0.01645  0.10414  0.09737
QUAD:V1        0  SENS2X1:V1     3     10769   68299      18     270     0     0   -0.02828  0.02740  0.13418
QUAD:V1        0  SENS2X1:V1     4     68489   56732      71     180     0     0   -0.05128 -0.11309  0.06303
QUAD:V1        0  SENS2X1:V1     5     68561   79628     -20     180     0     0   -0.03552  0.07104 -0.11788
QUAD:V1        0  SENS2X1:V1     6     77637   21754     -15     270     0     0   -0.33657 -0.00821  0.01183
QUAD:V1        0  SENS2X1:V1     7     54810   21558     -54     270     0     0   -0.06315  0.00000  0.00658
 
QUAD:V1        1  SENS2X1:V1     0     21757   33329     178       0     0     0    0.08883  0.03158 -0.20830
QUAD:V1        1  SENS2X1:V1     1     21773   10446      61       0     0     0   -0.01448  0.04211 -0.24943
QUAD:V1        1  SENS2X1:V1     2     33430   68158     257     270     0     0    0.02698 -0.04660 -0.07370
QUAD:V1        1  SENS2X1:V1     3     10628   68183     247     270     0     0    0.04014 -0.08498 -0.06448
QUAD:V1        1  SENS2X1:V1     4     68349   56949     161     180     0     0   -0.00066 -0.02895  0.05481
QUAD:V1        1  SENS2X1:V1     5     68345   79783     231     180     0     0    0.06843 -0.13948  0.03836
QUAD:V1        1  SENS2X1:V1     6     77454   21811     111     270     0     0    0.05919 -0.06029 -0.11707
QUAD:V1        1  SENS2X1:V1     7     54729   21779     106     270     0     0    0.07632 -0.04933 -0.16580
 
QUAD:V1        2  SENS2X1:V1     0     21741   33265       0       0     0     0   -0.06053  0.00000  0.00000
QUAD:V1        2  SENS2X1:V1     1     21752   10493       0       0     0     0    0.10132  0.00000  0.00000
QUAD:V1        2  SENS2X1:V1     2     32869   68638       0     270     0     0    0.07036  0.00000  0.00000
QUAD:V1        2  SENS2X1:V1     3     10462   68624       0     270     0     0    0.00658  0.00000  0.00000
QUAD:V1        2  SENS2X1:V1     4     68166   57261       0     180     0     0    0.17894  0.00000  0.00000
QUAD:V1        2  SENS2X1:V1     5     68109   79832       0     180     0     0    0.11972  0.00000  0.00000
QUAD:V1        2  SENS2X1:V1     6     77482   21698       0     270     0     0   -0.02762  0.00000  0.00000
QUAD:V1        2  SENS2X1:V1     7     54709   21779       0     270     0     0    0.02499  0.00000  0.00000
 
QUAD:V1        3  SENS2X1:V1     0     21730   33098     102       0     0     0    0.09278 -0.05132 -0.27140
QUAD:V1        3  SENS2X1:V1     1     21755   10477      40       0     0     0    0.06580 -0.02369 -0.32612
QUAD:V1        3  SENS2X1:V1     2     33193   68452     272     270     0     0    0.34083 -0.02192 -0.18687
QUAD:V1        3  SENS2X1:V1     3     10904   68416     270     270     0     0    0.01645  0.00823 -0.15397
QUAD:V1        3  SENS2X1:V1     4     68570   56923     194     180     0     0    0.12435  0.06974  0.07401
QUAD:V1        3  SENS2X1:V1     5     68456   79666     246     180     0     0    0.20857  0.04737  0.12882
QUAD:V1        3  SENS2X1:V1     6     77425   21681      60     270     0     0    0.05264  0.00274 -0.30004
QUAD:V1        3  SENS2X1:V1     7     54648   21761     118     270     0     0    0.01645 -0.00822 -0.22107
 
CSPAD:V1       0  QUAD:V1        0     -4500   -4500       0      90     0     0    0.00000  0.00000  0.00000
CSPAD:V1       0  QUAD:V1        1     -4500    4500       0       0     0     0    0.00000  0.00000  0.00000
CSPAD:V1       0  QUAD:V1        2      4500    4500       0     270     0     0    0.00000  0.00000  0.00000
CSPAD:V1       0  QUAD:V1        3      4500   -4500       0     180     0     0    0.00000  0.00000  0.00000

All lines started with hash “#” are comments, which are also accessible through the program interface as a dictionary. XPP-like CSPAD with all sensors attached to the same plate is measured as a single detector. Its content part omits quads

Code Block
# TITLE      Geometry parameters of CSPAD-XPP
# METROLOGY  /reg/neh/home1/dubrovin/LCLS/CSPadMetrologyProc/2013-10-09-CSPAD-XPP-Metrology.txt
...
 
# HDR PARENT IND        OBJECT IND    X0[um]  Y0[um]  Z0[um]   ROT-Z ROT-Y ROT-X     TILT-Z   TILT-Y   TILT-X
CSPAD:V2       0  SENS2X1:V1     0     51621  112683     153      90     0     0    0.48292  0.00000  0.00263
CSPAD:V2       0  SENS2X1:V1     1     74168  112907     135      90     0     0    0.48886 -0.05755  0.01316
CSPAD:V2       0  SENS2X1:V1     2     16366  124137     107       0     0     0    0.32370  0.00395 -0.01096
CSPAD:V2       0  SENS2X1:V1     3     16415  101350     185       0     0     0    0.15130  0.09867 -0.29055
CSPAD:V2       0  SENS2X1:V1     4     27786  159233     123     270     0     0    0.24474 -0.03015  0.03948
CSPAD:V2       0  SENS2X1:V1     5      4845  159260     106     270     0     0    0.05987 -0.04659  0.01053
CSPAD:V2       0  SENS2X1:V1     6     62758  168631     132       0     0     0    0.44940  0.02895 -0.00548
CSPAD:V2       0  SENS2X1:V1     7     62881  145851     137       0     0     0    0.20068  0.03553 -0.03015
CSPAD:V2       0  SENS2X1:V1     8    107098  129494     165       0     0     0    0.01316  0.01184 -0.02742
CSPAD:V2       0  SENS2X1:V1     9    107067  106699     152       0     0     0   -0.15924 -0.01316 -0.05208
CSPAD:V2       0  SENS2X1:V1    10    118871  164660     152     270     0     0    0.11249 -0.02193  0.04078
CSPAD:V2       0  SENS2X1:V1    11     95879  164632     143     270     0     0   -0.07632 -0.05757  0.03158
CSPAD:V2       0  SENS2X1:V1    12    153905  153051     158     180     0     0   -0.03026  0.00000 -0.04385
CSPAD:V2       0  SENS2X1:V1    13    153838  175841     140     180     0     0   -0.03947 -0.01973 -0.16719
CSPAD:V2       0  SENS2X1:V1    14    163149  117980     156     270     0     0   -0.17500 -0.04385 -0.00526
CSPAD:V2       0  SENS2X1:V1    15    140287  117936     153     270     0     0    0.00000 -0.02741 -0.00790
CSPAD:V2       0  SENS2X1:V1    16    123905   73726     133     270     0     0    0.00263 -0.00548 -0.00921
CSPAD:V2       0  SENS2X1:V1    17    101282   73699     130     270     0     0    0.20725 -0.02740 -0.03948
CSPAD:V2       0  SENS2X1:V1    18    159023   62203     142     180     0     0   -0.05461 -0.00263 -0.03562
CSPAD:V2       0  SENS2X1:V1    19    159024   84885     136     180     0     0   -0.08026  0.01579 -0.06576
CSPAD:V2       0  SENS2X1:V1    20    147998   26847     106      90     0     0    0.03158 -0.08219  0.08947
CSPAD:V2       0  SENS2X1:V1    21    170404   26856      96      90     0     0   -0.07893 -0.00822  0.06972
CSPAD:V2       0  SENS2X1:V1    22    112701   17748      97     180     0     0    0.26908 -0.02500 -0.00548
CSPAD:V2       0  SENS2X1:V1    23    112640   40586     100     180     0     0    0.03685 -0.01448  0.03836
CSPAD:V2       0  SENS2X1:V1    24     68448   57015     119     180     0     0    0.27835 -0.02501  0.09319
CSPAD:V2       0  SENS2X1:V1    25     68292   79701     120     180     0     0    0.37440 -0.03290 -0.04112
CSPAD:V2       0  SENS2X1:V1    26     56919   21965      69      90     0     0    0.18024 -0.06578  0.07894
CSPAD:V2       0  SENS2X1:V1    27     79497   22002      67      90     0     0    0.12040 -0.02740  0.09211
CSPAD:V2       0  SENS2X1:V1    28     21658   33119      72       0     0     0    0.27240  0.03553 -0.12332
CSPAD:V2       0  SENS2X1:V1    29     21748   10489      28       0     0     0    0.09805  0.03027 -0.07946
CSPAD:V2       0  SENS2X1:V1    30     12357   68156      97      90     0     0    0.20919  0.03562  0.05789
CSPAD:V2       0  SENS2X1:V1    31     35247   68250      89      90     0     0    0.09144 -0.04109  0.02368

Content of CSPAD2x2 geometry file consist of data for two sensors only:

Code Block
# TITLE      Geometry parameters of CSPAD2X2
# METROLOGY  /reg/neh/home1/dubrovin/LCLS/CSPad2x2Metrology/CSPad2x2/2014-04-25-CSPAD2X2-3-MEC-Metrology.txt
...
 
# HDR PARENT IND        OBJECT IND    X0[um]  Y0[um]  Z0[um]   ROT-Z ROT-Y ROT-X     TILT-Z   TILT-Y   TILT-X
 
CSPAD2X1:V1    0  SENS2X1:V1     0     21848   10490       6     180     0     0   -0.00197 -0.01049  0.03004
CSPAD2X1:V1    0  SENS2X1:V1     1     21943   33908       4     180     0     0   -0.16127 -0.00262 -0.01639

If the detector pixel coordinates should be presented relative to IP or other setup component, have an offset or flipped around axis one more line must to be added, for example

Code Block
  SETUP-IP 0 CSPAD2X2:V1 0 -100 200 1000000 0 180 0 0 0 0

 

 

 

 

 

 

Code Block
#file: pyimgalgos/src/GeometryObject.py

def rotation(X, Y, C, S) :
    Xrot = X*C - Y*S 
    Yrot = Y*C + X*S 
    return Xrot, Yrot

class GeometryObject :
    ...
    def transform_geo_coord_arrays(self, X, Y, Z) :
        ...
	    # define Cx, Cy, Cz, Sx, Sy, Sz - cosines and sines of rotation + tilt angles
        ...

        X1, Y1 = rotation(X,  Y,  Cz, Sz)
        Z2, X2 = rotation(Z,  X1, Cy, Sy)
        Y3, Z3 = rotation(Y1, Z2, Cx, Sx)

        Zt = Z3 + self.z0
        Yt = Y3 + self.y0
        Xt = X2 + self.x0

        return Xt, Yt, Zt 

...