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.integrate
overlaps_filter
options broken
#1890
Comments
I'll find you something |
If there are multi-lattice images with overlaps on Zenodo, I think that would make a good addition for dials.data. We probably only need a fairly narrow wedge to test success (or not) of whatever our overlap handling facilities are. |
@dagewa what do you know https://zenodo.org/record/10820 Like, we did this 7 years back 😀👍 Fortune favours the prepared |
Nice. Possibly a bit big for |
Guess we can take one of the tarballs, split to a smaller one and make a new Zenodo upload of just a small sweep |
I'll look into doing that with a reduced version of |
Right, I have integrated the 6 lattices in the semisynthetic set
Does anybody understand the overlap handling in DIALS? |
I for one am starting to smell a little (well justified) scope creep with this issue. |
You do have a point. I was trying to figure out |
Ok, the first problem is that shoeboxes get deleted here dials/algorithms/integration/processor.py Lines 561 to 563 in a2cb71b
But even if I stop that happening, it goes on to crash:
|
This issue has been automatically marked as stale because it has not had recent activity. The label will be removed automatically if any activity occurs. Thank you for your contributions. |
Removing the stale label because I see many datasets with multiple lattices. See also @2555 and @2296. @dagewa |
I don't think a script like that was tried before. I won't have time to look at it unfortunately, but I would be interested in your results. |
My rudimentary attempt did not improve the map artifact; it can be due to a bug in my script, a bad threshold for duplicates and/or the artifact being caused by some other pathology. At the moment I don't have time to pursue this further, but for the record I put my script here. from dials.array_family import flex
import numpy as np
import scipy.spatial
import sys
if len(sys.argv) != 4:
sys.stderr.write("Usage: dials.python remove_overlaps.py input1.refl input2.refl output.refl\n")
exit(-1)
_, fn_in1, fn_in2, fn_out = sys.argv
d1 = flex.reflection_table.from_file(fn_in1)
d2 = flex.reflection_table.from_file(fn_in2)
a1 = np.array(d1['xyzcal.px'])
a2 = np.array(d2['xyzcal.px'])
t1 = scipy.spatial.KDTree(a1)
t2 = scipy.spatial.KDTree(a2)
dups = t1.query_ball_tree(t2, r = 5)
fine = [len(x) == 0 for x in dups]
good = d1.select(flex.bool(fine))
print("Number of reflections in Input 1:", len(d1))
print("Number of reflections in Input 1:", len(d2))
print("Numer of written reflections:", len(good))
print("Number of overlapped and removed reflections:", len(d1) - len(good))
good.as_file(fn_out) |
Reported on the support list. We don't have a multi lattice data at hand to test (I think?) but the issue can be demonstrated with any old dataset
Ends with
The text was updated successfully, but these errors were encountered: