-
Notifications
You must be signed in to change notification settings - Fork 18
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
Make FormatHDF5SaclaMPCCD lazy #227
Conversation
@biochem-fan do you have time to review this since it touches the SACLA format class? |
This looks fine to me but I don't have time to test this by building the latest code and re-processing something at the moment. Can you process lysozyme or something and make sure? The important thing is that it respects both the mask defined in the HDF5 file (e.g. detector edges) and one supplied by a user (e.g. shadow of beam stopper). |
- Add FormatMultiImageLazy as a mixin - Bugfix in FormatMultiImage: If we're creating an ImageSetLazy, we still need to get the static mask from the format class and add it to the imageset. Co-authored-by: Aaron Brewster <[email protected]>
See dxtbx issue 245: #245
9783757
to
a701a40
Compare
Codecov Report
@@ Coverage Diff @@
## master #227 +/- ##
==========================================
+ Coverage 46.39% 46.49% +0.09%
==========================================
Files 228 228
Lines 18995 19012 +17
Branches 2749 2751 +2
==========================================
+ Hits 8813 8839 +26
+ Misses 9677 9667 -10
- Partials 505 506 +1 |
This looks fine, as long as you are happy this doesn't break biochem-fan's cases. Probably needs a |
This doesn't capture any variables from the surrounding, so this is clearer than defining it inline (in which case it might capture variables).
Okay, so a couple of extra points:
|
And, because I want to get it in for DIALS 3.3, I've separated the bugfix parts into #268 (which will be merged once the CI tests pass). |
(includes now using lazy explicitly to get more test coverage)
libtbx.pytest test_imageset.py::test_single_file_indices was giving different result than libtbx.pytest test_imageset.py. Needed to add nullify_format_instance and then update the test to the right value for a fresh load of the data.
I've fixed the test_single_file_indices problem in fa895eb and fa895eb by explicitly testing with or without the lazy parameter. I've also ran @biochem-fan's requested test. I've ran dials.import on SACLA-MPCCD-Phase3-21528-5images.h5, which has a static mask, then I've ran dials.find spots with an without a custom mask. The static mask and the custom mask are both used. I then disabled the static mask manually to double check I got different results. So I think we are good to go on this. |
I'm a little concerned with the sprinkling of That said, It only seems to be in tests that use If it's just for these cases, then I guess as you are happy it's fine. |
At the moment it's just for those cases and practically speaking only matters in tests like these where the same file is loaded in different ways. It's documented in #245 (and I don't have an idea how to fix it at present). |
Add FormatMultiImageLazy as a mixin
Bugfix in FormatMultiImage: If we're creating an ImageSetLazy, we still[Applied separately in Apply static format masks to Lazy ImageSets #268 - ND]need to get the static mask from the format class and add it to the
imageset.
Co-authored-by: Aaron Brewster [email protected]