When defining the detector roi around the pixel of interest, there are several manners to proceed:
Using the fix_size parameter. The vertices of the bounding box (6 since it is a cube) must be defined so that the Bragg peak position is at the center of the bounding box. This will generate a centered output file with the right shape. However it will look for the Bragg peak position considering the full detector. As a result, the Bragg peak may not be found correctly because of potential hot pixels (and no masking). It would be better that the Bragg peak is found only considering the bounding box but given in the full detector coordinates (like below).
Using _center_roix, _center_roiy and _roidetector parameters. Then the roi (square) will be:
roi = [center_roi_y - roi_detector[0], center_roi_y + roi_detector[1],
center_roi_x - roi_detector[2], center_roi_x + roi_detector[3]].
This will tell the script to take into account the roi during for the entire process. Meaning that the Bragg peak determination will be done in the above defined roi but given in the full detector coordinates (which is exactly what we need!).
Using only _roidetector (_center_roix and _center_roiy are None). The users have to define the detector roi themself. The roi will be: roi = [Vstart, Vstop, Hstart, Hstop]. It will work as the second point.
Expected behavior
_fixsize and _roidetector almost work similarly. Except that _fixsize allows to force the centering of the data along the rocking curve axis and does not allow to find the Bragg peak in the defined bounding box. Do we need this ?
When defining the detector roi around the pixel of interest, there are several manners to proceed:
Expected behavior _fixsize and _roidetector almost work similarly. Except that _fixsize allows to force the centering of the data along the rocking curve axis and does not allow to find the Bragg peak in the defined bounding box. Do we need this ?