Open dagewa opened 6 years ago
Suspect the best approach with this (rather venerable and overlooked) issue would be to define the expected behaviour then implement to that - do we have a clear set of expectations?
I can see this becoming more complex with multi-panel (co-planar or non-co-planar) detectors as an additional challenge
As discussed on the dials-support@lists.sourceforge.net mailing list, the image viewer coordinates displayed in the status bar do not match with the dxtbx Panel pixel coordinate system. The effect seems to vary with format.
FormatCBFMiniPilatus
has a single panel with coincident "Picture" and "Readout" coordinates. However, these are shifted by 1 whole pixel in both fast and slow directions.If
dials_regression
is present, this can be demonstrated as follows:Although this example uses the
dials.image_viewer
, the behaviour comes from thecctbx.image_viewer
upstream. The intention was to place the cross at 0,0 in the Panel's pixel coordinate system. It is displayed at a "Readout" coordinate of 0,0, but this overlays the point 1,1 in the pixel coordinate system.Other formats have different issues. For example
This time the cross is where we expect, but the Picture and Readout coordinates are offset by 0.5 pixels
It even matters if the image is imported or viewed directly. For example,
dials.image_viewer 1_000001.img
opens the same image, but the Picture and Readout coordinates no longer coincide in the top left corner.Basic expectations discussed on the mailing list
Hovering in the center of the origin pixel shows:
Hovering near the corner of the origin pixel closest to the corner of the panel shows:
The Picture and Readout values can in general differ, as the Picture involves an orthographic projection from the laboratory coordinate system. However, these frames should be aligned such that (0,0) of the Picture coincides with (0,0) of the Readout for Panel 0.
The display should be consistent whether the image viewer is passed an image file or a
datablock.json