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.refine: better error message on failure with a zero length reflection list #2607

Merged
merged 3 commits into from
Feb 12, 2024

Conversation

dagewa
Copy link
Member

@dagewa dagewa commented Feb 12, 2024

The situation that lead here is an attempt to index a sparse pattern using 2 images only, separated widely in phi. These images represent two separate experiments, but we are jointly indexing one crystal model. As indexing progresses in macrocycles, one image becomes favoured, and the spots on the other image are no longer being indexed. Eventually no indexed spots are left on the weaker image.

Possibly in this case we should continue anyway and just throw out the bad image. However, at the very least we can fail with an appropriate error message. This PR adds that message, rather than failing with a related but confusing message later.

dagewa and others added 3 commits February 12, 2024 11:12
get a confusing error, like:

Experiment id 0 contains no reflections with valid scan angles

and while this is strictly true, the real cause of failure is that there
are no reflections at all. Catch that separately.
@dagewa dagewa enabled auto-merge (squash) February 12, 2024 11:21
Copy link

codecov bot commented Feb 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (fc4c37a) 78.52% compared to head (5d4f17a) 90.67%.

Additional details and impacted files
@@             Coverage Diff             @@
##             main    #2607       +/-   ##
===========================================
+ Coverage   78.52%   90.67%   +12.15%     
===========================================
  Files         609      282      -327     
  Lines       75094    25727    -49367     
  Branches    10722     2294     -8428     
===========================================
- Hits        58968    23329    -35639     
+ Misses      13954     2291    -11663     
+ Partials     2172      107     -2065     

@dagewa dagewa merged commit 6ec457a into main Feb 12, 2024
15 of 18 checks passed
@dagewa dagewa deleted the refine-fail-on-zero-len-reflection-list branch February 12, 2024 12:35
benjaminhwilliams pushed a commit that referenced this pull request Feb 27, 2024
…flection list (#2607)

Make explicit the cause of failure in this case.
benjaminhwilliams pushed a commit that referenced this pull request Feb 27, 2024
…flection list (#2607)

Make explicit the cause of failure in this case.
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

2 participants