tjlane / pypad

Intuitive, high-level interface to the CSPAD
Other
2 stars 1 forks source link

assembly of CSPAD image is wrong in genfilter, score, and assemble #6

Closed sellberg closed 11 years ago

sellberg commented 11 years ago

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):

genfilter

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.

score

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.

assembled-gold

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

tjlane commented 11 years ago

Scripts that Need Love:

sellberg commented 11 years ago

Scripts with false assembly: