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

Allow combining masks using dials.generate_mask #2711

Merged
merged 7 commits into from
Aug 22, 2024
Merged

Allow combining masks using dials.generate_mask #2711

merged 7 commits into from
Aug 22, 2024

Conversation

phyy-nx
Copy link
Member

@phyy-nx phyy-nx commented Jul 31, 2024

eg dials.generate_mask imported.expt beamcenter.mask border=1

or dials.generate_mask beamcenter.mask border.mask

Requires cctbx/dxtbx#744

  • TODO: update docs and add a test

eg dials.generate_mask imported.expt beamcenter.mask border=1

or dials.generate_mask beamcenter.mask border.mask
@biochem-fan
Copy link
Member

Hi Aaron, this is a great functionality I also need.

TODO: update docs and add a test

Yes, documenting how masking works in DIALS would be very nice.

It is not clear how the trusted range mask, the mask from a dxtbx class and the user supplied mask work. Are they combined, or one replaces the other?

There are some old discussions (e.g. #236 and #1340) but I am not sure if the current implementation works in the same way.

@phyy-nx phyy-nx marked this pull request as ready for review July 31, 2024 19:08
@phyy-nx
Copy link
Member Author

phyy-nx commented Jul 31, 2024

It is not clear how the trusted range mask, the mask from a dxtbx class and the user supplied mask work. Are they combined, or one replaces the other?

My understanding is that the final mask for spotfinding and integration is the static mask from dxtbx & the dynamic mask from dxtbx & the trusted range mask & the user supplied mask

Copy link

codecov bot commented Jul 31, 2024

Codecov Report

Attention: Patch coverage is 72.72727% with 15 lines in your changes missing coverage. Please review.

Project coverage is 78.19%. Comparing base (1052d96) to head (24bde47).
Report is 7 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2711      +/-   ##
==========================================
+ Coverage   78.16%   78.19%   +0.03%     
==========================================
  Files         616      616              
  Lines       76578    76730     +152     
  Branches    10978    11020      +42     
==========================================
+ Hits        59855    60001     +146     
- Misses      14485    14486       +1     
- Partials     2238     2243       +5     

Copy link
Contributor

@graeme-winter graeme-winter left a comment

Choose a reason for hiding this comment

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

Mostly cosmetic though some comments around handling files gracefully which are pickled but not pickled masks

starting is a nasty prefix, suggested improvements

src/dials/command_line/generate_mask.py Outdated Show resolved Hide resolved
src/dials/command_line/generate_mask.py Outdated Show resolved Hide resolved
src/dials/command_line/generate_mask.py Outdated Show resolved Hide resolved
src/dials/command_line/generate_mask.py Outdated Show resolved Hide resolved
src/dials/command_line/generate_mask.py Outdated Show resolved Hide resolved
src/dials/command_line/generate_mask.py Outdated Show resolved Hide resolved
src/dials/command_line/generate_mask.py Outdated Show resolved Hide resolved
src/dials/command_line/generate_mask.py Show resolved Hide resolved
src/dials/command_line/generate_mask.py Outdated Show resolved Hide resolved
src/dials/command_line/generate_mask.py Outdated Show resolved Hide resolved
@phyy-nx
Copy link
Member Author

phyy-nx commented Aug 19, 2024

Mostly cosmetic though some comments around handling files gracefully which are pickled but not pickled masks

starting is a nasty prefix, suggested improvements

Done!

@phyy-nx
Copy link
Member Author

phyy-nx commented Aug 21, 2024

@graeme-winter this is ready for your re-review. Tests are passing. Thanks!

Copy link
Contributor

@graeme-winter graeme-winter left a comment

Choose a reason for hiding this comment

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

Reviewed following updates, thank you

@phyy-nx phyy-nx merged commit c09969a into main Aug 22, 2024
21 checks passed
@phyy-nx phyy-nx deleted the combine_masks branch August 22, 2024 15:21
amyjaynethompson pushed a commit to amyjaynethompson/dials that referenced this pull request Sep 27, 2024
eg dials.generate_mask imported.expt backstop.mask border=1

or dials.generate_mask backstop.mask shadow.mask
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.

4 participants