-
Notifications
You must be signed in to change notification settings - Fork 46
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
Add known orientations to dials.stills_process #2110
Conversation
An old feature of xtc_process, if the user has previously indexed the images, they can provide those crystal orientations using the known_orientations as a list of paths to experiment lists. The bookkeeping is done by matching up filenames + image indices.
If known_orientations are provided, and an orientation for an image is not found, this is whether or not to attempt to index the image from scratch using indexing.method Co-authored-by: Daniel Paley <dwpaley@lbl.gov>
…on filtering This duplicate filtering code came when prepping Brewster 2018 Figure 5, where split spots on a detector 2.5m from the source were both indexed by known_orientations using the same miller_index. That code didn't check for multiple lattices, hence this re-write.
The new test requires dials/data-files#42 to be merged to add a set of crystal orientations the test uses. After merging that, it needs to be referenced in the image_examples dataset in dials-data. |
Codecov Report
@@ Coverage Diff @@
## main #2110 +/- ##
==========================================
- Coverage 80.36% 80.30% -0.07%
==========================================
Files 580 580
Lines 65706 65764 +58
Branches 9260 9280 +20
==========================================
+ Hits 52805 52810 +5
- Misses 10847 10893 +46
- Partials 2054 2061 +7 |
Hi, I'd like to merge this tomorrow unless there is feedback. Thanks! |
…edundant check for a path in test_stills_process
Removes early return for known_crystal_models so the later code that filters duplicate reflections can still run Co-authored-by: Daniel Paley dwpaley@lbl.gov
Test failure seems unrelated and is on main. Merging. Thanks @dwpaley. |
In Brewster 2018 (see figure 5), two detectors were used to collect data: a front CSPAD detector at a standard position and a second CSPAD 2.5m behind the front detector, used to record low resolution data. The crystal orientations from the front detector were used to index spots on the back detector using bookkeeping code originally in
cctbx.xfel.xtc_process
. This PR ports that bookkeeping into dials.stills_process as a general use case. A version of the referenced branch was successfully used in a recent XFEL experiment with a front and a back detector.Specifically, this PR adds
known_orientations
as a parameter to dials.stills_process, used to specify the path to previous processing results, including crystal orientations. If specified, the known orientations for the images will be used to index the images. Provide paths to experiment list files, using wildcards as needed. The program will load the experiment lists files up front and create a dictionary mapping filename/image number to experiment lists (including potentially multiple lattices). Then, for each image, it refers to this dictionary and if the image had been previously indexed, it uses that orientation to index the image.Additionally, the
require_known_orientation=False
parameter is added. If known_orientations are provided, and an orientation for an image is not found, this is whether or not to attempt to index the image from scratch using indexing.methodIncludes a test of known_orientations in
test_stills_process.py
Note the XFEL GUI already knows about this parameter.
Co-authored-by: Daniel Paley dwpaley@lbl.gov