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.stills_process performance improvements #1846

Merged
merged 8 commits into from
Aug 26, 2021
Merged

dials.stills_process performance improvements #1846

merged 8 commits into from
Aug 26, 2021

Conversation

dwpaley
Copy link
Contributor

@dwpaley dwpaley commented Aug 13, 2021

  • Speed up Kapton correction by returning once two Kapton faces intersecting the beam have been found.
  • Filter out rare cases where sigma_b (a spot shape parameter) is nonphysically large. This avoids integration hanging in the Kapton correction step when millions of pixels are inside predicted reflections.

Co-authored-by: Aaron Brewster asbrewster@lbl.gov
Co-authored-by: Asmit Bhowmick abhowmick@lbl.gov

@phyy-nx
Copy link
Member

phyy-nx commented Aug 16, 2021

One of the performance tweaks here throws out images with sigma b > 0.1 degrees. This is because the kapton correction code churns on these data for images with big unit cells and lots of pixels to integrate with sigma b is large.

Here is a histogram of sigma b values from nearly 600K images from a recent XFEL experiment across several different samples. The two peaks come from two different binning sizes of a Rayonix detector.

image

We are close enough to the 0.1 degree cutoff in this PR that I'd rather move it to a phil parameter instead of a hard coded parameter. Maybe profile.gaussian_rs.parameters.sigma_b_cutoff = None? We'd override to 0.1 in dials.stills_process. Problem with this is it would only be checked in dials.stills_process, but the parameter is in a dials.integrate phil scope... Might be ok though?

@phyy-nx
Copy link
Member

phyy-nx commented Aug 24, 2021

Moved to stills_process-specific phil param. Will merge tomorrow unless there are any comments. Thanks.

@codecov
Copy link

codecov bot commented Aug 24, 2021

Codecov Report

Merging #1846 (fb46edf) into main (a26385a) will decrease coverage by 0.00%.
The diff coverage is 75.00%.

@@            Coverage Diff             @@
##             main    #1846      +/-   ##
==========================================
- Coverage   67.16%   67.15%   -0.01%     
==========================================
  Files         617      617              
  Lines       69552    69532      -20     
  Branches     9673     9672       -1     
==========================================
- Hits        46712    46695      -17     
+ Misses      20895    20894       -1     
+ Partials     1945     1943       -2     

@phyy-nx phyy-nx merged commit b023378 into main Aug 26, 2021
@phyy-nx phyy-nx deleted the lv70 branch August 26, 2021 16:34
phyy-nx added a commit to cctbx/cctbx_project that referenced this pull request Sep 23, 2021
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

Successfully merging this pull request may close these issues.

None yet

4 participants