You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Likewise, FormatCBFFullPilatus uses imgCIF_H, which calls cbflib's get_pixel_coordinates(0, 0), which according to the docs, returns the center of pixel 0,0. So to go from ImageCIF to dxtbx we need to apply a half pixel correction. So with this diff (and after dials/dials#2194 is merged), the image from dials/dials#2190 displays properly:
Note, this is like the cause of the 0.5 pixel offset problem @nksauter worked through in 2020 (see section 2.3.1).
Also note if we fix all the CBF format classes by subtracting this half pixel offset, we'll need to make a corresponding change to cbf_writer, which writes CBFs following the dxtbx convention instead of the ImageCIF convention. It will need to add a half pixel to the vectors it writes.
The text was updated successfully, but these errors were encountered:
As discussed in dials/dials#2194 (text modified from this comment):
dxtbx is reading the header wrong for MiniCBF. ImageCIF specifies counting from the center of the pixel, not the corner, as shown in these two references:
http://www.bernstein-plus-sons.com/software/CBF/doc/cif_img_1.8.4.html#_diffrn_detector_element.reference_center_fast
http://www.bernstein-plus-sons.com/software/CBF/doc/cif_img_1.8.4.html#array_structure_list_axis
Compare to the relevant lines from FormatCBFMini, where we aren't subtracting 0.5 from the beam_xy parameter.
https://github.com/cctbx/dxtbx/blob/main/src/dxtbx/format/FormatCBFMini.py#L128
https://github.com/cctbx/dxtbx/blob/main/src/dxtbx/format/FormatCBFMini.py#L170
Likewise, FormatCBFFullPilatus uses imgCIF_H, which calls cbflib's get_pixel_coordinates(0, 0), which according to the docs, returns the center of pixel 0,0. So to go from ImageCIF to dxtbx we need to apply a half pixel correction. So with this diff (and after dials/dials#2194 is merged), the image from dials/dials#2190 displays properly:
Note, this is like the cause of the 0.5 pixel offset problem @nksauter worked through in 2020 (see section 2.3.1).
Also note if we fix all the CBF format classes by subtracting this half pixel offset, we'll need to make a corresponding change to cbf_writer, which writes CBFs following the dxtbx convention instead of the ImageCIF convention. It will need to add a half pixel to the vectors it writes.
The text was updated successfully, but these errors were encountered: