Looking a bit closer at the scripts and their outputs there are inconsistencies between the coordinate system chosen for the various scripts. I propose we stick to the CXI convention, i.e. +X towards hutch door, +Y towards ceiling, and +Z downstream. This is what cheetah uses (i.e. https://github.com/sellberg/cheetah but this should still be true for https://github.com/antonbarty/cheetah) and outputs for it's assembled images. To view the front of the detector with a simple image viewer (which usually insists to put the origin in the upper left or lower left corner, such as plt.imshow()), this requires to mirror the X-axis prior to assembly, but this should only be done by the assembly script viewing the image and not saved in any files using an assembled coordinate system.
Below I compare the output of pypad with that of cheetah (marked r0135) and comment on differences (look for noisy ASIC):
X-Y plane rotated 90 deg clockwise when using genfilter. Needs to transpose and mirror rows (i.e. Y-axis after transpose) in internally assembled array.
X-Y axes flipped and mirrored in X as well as Y when using score. Needs to transpose and mirror both rows and cols in internally assembled array.
X-Y plane rotated 90 deg clockwise when using assemble. Needs to transpose and mirror row index (i.e. Y-axis after transpose) in internally assembled array.
Looking a bit closer at the scripts and their outputs there are inconsistencies between the coordinate system chosen for the various scripts. I propose we stick to the CXI convention, i.e. +X towards hutch door, +Y towards ceiling, and +Z downstream. This is what cheetah uses (i.e. https://github.com/sellberg/cheetah but this should still be true for https://github.com/antonbarty/cheetah) and outputs for it's assembled images. To view the front of the detector with a simple image viewer (which usually insists to put the origin in the upper left or lower left corner, such as
plt.imshow()
), this requires to mirror the X-axis prior to assembly, but this should only be done by the assembly script viewing the image and not saved in any files using an assembled coordinate system.Below I compare the output of pypad with that of cheetah (marked r0135) and comment on differences (look for noisy ASIC):
X-Y plane rotated 90 deg clockwise when using
genfilter
. Needs to transpose and mirror rows (i.e. Y-axis after transpose) in internally assembled array.X-Y axes flipped and mirrored in X as well as Y when using
score
. Needs to transpose and mirror both rows and cols in internally assembled array.X-Y plane rotated 90 deg clockwise when using
assemble
. Needs to transpose and mirror row index (i.e. Y-axis after transpose) in internally assembled array.This issue may or may not be related to https://github.com/tjlane/pypad/issues/1