dials icon indicating copy to clipboard operation
dials copied to clipboard

Add known orientations to dials.stills_process

Open phyy-nx opened this issue 2 years ago • 3 comments

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]

phyy-nx avatar May 06 '22 23:05 phyy-nx

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.

phyy-nx avatar May 06 '22 23:05 phyy-nx

Codecov Report

Merging #2110 (0a20ea3) into main (c645ecc) will decrease coverage by 0.06%. The diff coverage is 17.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     

codecov[bot] avatar May 07 '22 00:05 codecov[bot]

Hi, I'd like to merge this tomorrow unless there is feedback. Thanks!

phyy-nx avatar May 11 '22 00:05 phyy-nx

Test failure seems unrelated and is on main. Merging. Thanks @dwpaley.

phyy-nx avatar Sep 22 '22 22:09 phyy-nx