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

Print helpful error message in dials.slice_sequence in case of invalid input. #2570

Merged
merged 4 commits into from
Feb 5, 2024

Conversation

jbeilstenedmands
Copy link
Contributor

Also allow multi-expt files for exclude_images_multiple

FIxes #2098

…d input.

Also allow multi-expt files for exclude_images_multiple
@jbeilstenedmands
Copy link
Contributor Author

In an example case, it now prints:

$ dials.slice_sequence split_0.* image_range=1,20 image_range=25,40
The following parameters have been modified:

image_range = 1 20
image_range = 25 40
input {
  experiments = split_0.expt
  reflections = split_0.refl
}

Sorry: The input experiment list and image_ranges are not of the same length (1 != 2).
To achieve multiple slices from a single sweep, the dials.slice_sequence can be run multiple times with different image_range values.
Alternatively, multi-experiment file pairs can be split with dials.split_experiments to help manage multiple-experiment workflows.

I also found the traceback could be triggered in the new exclude_images_multiple for multi-experiment input, but that case can be handled so the code has been updated.

Copy link
Member

@dagewa dagewa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Happy that this avoids the user seeing a traceback and the error message provided is informative 👍

src/dials/command_line/slice_sequence.py Outdated Show resolved Hide resolved
Copy link

codecov bot commented Jan 17, 2024

Codecov Report

Attention: 2 lines in your changes are missing coverage. Please review.

Comparison is base (7b19b5f) 78.53% compared to head (6c182e3) 78.54%.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2570   +/-   ##
=======================================
  Coverage   78.53%   78.54%           
=======================================
  Files         609      609           
  Lines       75054    75057    +3     
  Branches    10712    10713    +1     
=======================================
+ Hits        58945    58951    +6     
+ Misses      13943    13939    -4     
- Partials     2166     2167    +1     

@jbeilstenedmands jbeilstenedmands merged commit 394aac4 into main Feb 5, 2024
16 of 18 checks passed
@jbeilstenedmands jbeilstenedmands deleted the slice_sequence_fail branch February 5, 2024 16:12
benjaminhwilliams pushed a commit that referenced this pull request Feb 27, 2024
…d input. (#2570)

Also allow multi-expt files for exclude_images_multiple

Fixes #2098 

Co-authored-by: David Waterman <dagewa@users.noreply.github.com>
benjaminhwilliams pushed a commit that referenced this pull request Feb 27, 2024
…d input. (#2570)

Also allow multi-expt files for exclude_images_multiple

Fixes #2098 

Co-authored-by: David Waterman <dagewa@users.noreply.github.com>
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.

dials.slice_sequence failure: "Input experiment list and image_ranges are not of the same length"
3 participants