Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dials.image_viewer: position of predictions seems to be wrong #442

Closed
dagewa opened this issue Sep 12, 2017 · 2 comments
Closed

dials.image_viewer: position of predictions seems to be wrong #442

dagewa opened this issue Sep 12, 2017 · 2 comments

Comments

@dagewa
Copy link
Member

dagewa commented Sep 12, 2017

The display of predictions in the dials.image_viewer seems to be incorrect. For example, for i04-bag-training data, I index and find the spot on image 4 at around pixel (slow, fast) 1840,1835. I display the calculated centroid and the predicted centroid. Reading off values from the status bar I estimate the positions of the cross and the red spot as follows:

From image viewer
=================
            slow     fast
observed:   1840.785 1835.312
predicted:  1841.535 1835.812

Note that this implies there is a residual of about 0.9 pixels which seems rather high. Here are the images with values read off the status bar, highlighting where I had the cursor, as that was hidden while taking a screenshot:

centroid
predicted

Loading the reflection table in dials.python and selecting that reflection I can get at the real values for r['xyzobs.px.value'] and r['xyzcal.px']

>>> r['xyzobs.px.value']
(1835.2916666666667, 1840.75, 3.75)
>>> r['xyzcal.px']
(1835.289794544969, 1841.0089880829669, 3.7675501624336776)

So, the real residual on the image should only be 0.26 pixels, which better matches the RMSDs from indexing. Tidying up:

From reflection table
=====================
            slow     fast
observed:   1840.750 1835.292
predicted:  1841.009 1835.290

Comparing with the above table -- reminder:

From image viewer
=================
            slow     fast
observed:   1840.785 1835.312
predicted:  1841.535 1835.812

the observed position, i.e. the cross, seems to be about right whilst the prediction is way off.

@nksauter
Copy link
Contributor

nksauter commented Sep 12, 2017 via email

@dagewa
Copy link
Member Author

dagewa commented Sep 12, 2017

An easy way to investigate the issue is to set the predictions equal to the observations:

>>> from dials.array_family import flex
>>> rt=flex.reflection_table.from_pickle('indexed.pickle')
>>> rt['xyzcal.px']=rt['xyzobs.px.value']
>>> rt.as_pickle('pred_eq_obs.pickle')

Then all the spots show the same offset.
offset

It does indeed look like a 0.5 pixel issue, in each direction.

rjgildea added a commit that referenced this issue Sep 13, 2017
@Anthchirp Anthchirp mentioned this issue Sep 19, 2017
Anthchirp added a commit that referenced this issue Sep 19, 2017
* fix map coordinates in _dials.image_viewer_ (#442)
* fix max_cell determination in indexing (#386)
* fix for setting interval_width_degrees in scan-varying refinement
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants