dials
dials copied to clipboard
Add known orientations to dials.stills_process
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.method
Includes a test of known_orientations in test_stills_process.py
Note the XFEL GUI already knows about this parameter.
Co-authored-by: Daniel Paley [email protected]
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
Merging #2110 (0a20ea3) into main (c645ecc) will decrease coverage by
0.06%
. The diff coverage is17.64%
.
:exclamation: Current head 0a20ea3 differs from pull request most recent head 46e3467. Consider uploading reports for the commit 46e3467 to get more accurate results
@@ 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!
Test failure seems unrelated and is on main. Merging. Thanks @dwpaley.