Test How To
Set test environment
ssh -Y pslogin
ssh -Y psana
source /cds/sw/ds/ana/conda1/manage/bin/psconda.sh
Get files for alignment
Copy current version of the geometry file 1-end.data:
cp /cds/data/psdm//mec/meclx6420/calib/Epix10kaQuad\:\:CalibV1/MecTargetChamber.0\:Epix10kaQuad.3/geometry/1-end.data .
Process xtc data and generate averaged and max-intensity data arrays including det-calib-max.npy:
det_calib_ave_and_max exp=meclx6420:run=387 MecTargetChamber.0:Epix10kaQuad.3
Command to plot image and r-phi projection
geometry_image -h
geometry_image -a det-calib-max.npy -g 1-end.data -H 8
geometry_image -a det-calib-max.npy -g 1-end.data -H 8 -Z -110000
By default it uses psana coordinale frame. See for detail parameter --cframe CFRAME
Tilt of the detector
No tilt
# HDR PARENT IND OBJECT IND X0[um] Y0[um] Z0[um] ROT-Z ROT-Y ROT-X TILT-Z TILT-Y TILT-X CAMERA 0 EPIX10KA:V2 0 20791 -20806 3 0 0 0 0.23214 0.25731 0.20971 CAMERA 0 EPIX10KA:V2 1 -20692 -20880 -3 0 0 0 0.04054 -0.13699 -0.00753 CAMERA 0 EPIX10KA:V2 2 20697 20601 -3 0 0 0 0.25870 0.04055 0.01810 CAMERA 0 EPIX10KA:V2 3 -20796 21086 2 0 0 0 0.14601 -0.35560 0.02638 IP 0 CAMERA 0 -87000 13700 -112000 0 0 0 -1.80000 0.00000 0.00000
- Detector center is set to get image of concentric internal rings.
- External rings are strongly non-concentric with internal
- Sorry, but histogram on r-phi plot is not zoomed-in, so its radial scale is different from the plot.
Tilted detector
# HDR PARENT IND OBJECT IND X0[um] Y0[um] Z0[um] ROT-Z ROT-Y ROT-X TILT-Z TILT-Y TILT-X CAMERA 0 EPIX10KA:V2 0 20791 -20806 3 0 0 0 0.23214 0.25731 0.20971 CAMERA 0 EPIX10KA:V2 1 -20692 -20880 -3 0 0 0 0.04054 -0.13699 -0.00753 CAMERA 0 EPIX10KA:V2 2 20697 20601 -3 0 0 0 0.25870 0.04055 0.01810 CAMERA 0 EPIX10KA:V2 3 -20796 21086 2 0 0 0 0.14601 -0.35560 0.02638 IP 0 CAMERA 0 -84000 14400 -112000 0 25.5 0 -1.80000 0.00000 0.00000
- Detector center and tilt are manually tuned to make all rings almost concentric.
- This is a proof of principle that it works.
- Better tuning should be done if necessary.
Visualization issue
Switch to run 385 for smooth rings
Real problem
On 2022-10-11 Khachiwan Buakor shared slides pointing to the real issue as shown on figure
Explanation
Let us zoom in image for panel 0 and present it in two cases:
- original geometry from file 1-end data - shown image reproduces effect reported by Khachiwan.
- panel 0 in the geometry file is shifted by +50um (half pixel size) both in x and y - observed kinks in rings went to different position (in other ASIC).
This demo shows that reported effect is relevant to visualization - for 2-d plot float pixel coordinates need to be converted to bin indexes. At some places pixel index is incremented by 1 due to rounding of float to int.