yayahjb / cbflib

CBFlib repository cloned from SF CBFlib repository as of 1 Dec 15
8 stars 20 forks source link

Add --reverse option, add recognition of old AustSync detector. #61

Open jamesrhester opened 2 years ago

jamesrhester commented 2 years ago

The current adsc converter implicitly assumes that the X axis direction coincides with the fast direction on the detector. The --reverse option has been added to handle the case that these axes point in opposite directions. A reversal in X direction is equivalent to a rotation of 180 degrees around Z, thus X->-X and Y->-Y.

In addition, the ELEMENT_Y axis for the detector was originally fixed to [0 1 0] which is "up" for the non-reverse case, even though the "natural" direction for ELEMENT_Y is always down because the origin of detector coordinates is at the top left looking from the sample. As a result, the displacement_increment for this axis was negative. The current pull request changes this so that the ELEMENT_Y direction is always down and the displacement_increment is always positive.

Recognition of an old Australian Synchrotron MX-1 detector has also been added.