-
Notifications
You must be signed in to change notification settings - Fork 46
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
Shorthand to exclude regular calibration images #2511
Conversation
Codecov Report
@@ Coverage Diff @@
## main #2511 +/- ##
==========================================
- Coverage 78.83% 78.81% -0.03%
==========================================
Files 609 609
Lines 74522 74554 +32
Branches 10597 10605 +8
==========================================
+ Hits 58749 58758 +9
- Misses 13606 13619 +13
- Partials 2167 2177 +10 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does seem quite a niche use case, but the implementation is concise and I've ran a test dataset through with these options and everything behaves as expected so looks good to me.
One thing I wanted to check - does the rotation continue smoothly during the calibration images (it must for the current implementation to be correct)? Otherwise we need to think about splitting the data into separate sweeps which would be much more involved.
Thanks! I looked the method up. The relevant part is described here: https://journals.iucr.org/j/issues/2018/06/00/yr5038/index.html#SEC5.1 Rotation is continuous, with defocusing to provide a real space crystal image occurring for every N images. The diffraction patterns either side of image N look fine, so it seems this really can be done quickly enough to affect only individual frames from the sweep. |
While working with @aimeon on processing cRED data from Stockholm University, we found that we wanted to exclude every Nth image from the scan, because these are used for calibration during data collection and do not contain diffraction. We could do this by adding
exclude_images
parameters todials.find_spots
anddials.integrate
, but the command-line parameter then becomes rather long.This PR adds a new parameter
exclude_images_multiple
, providing a simple shorthand that can be expanded into the appropriateexclude_images
command for any data set. For example, for a 517 image data set, withexclude_images_multiple=20
, this expansion is performed:This is printed to the log to be explicit about the expansion.
I toyed with adding this functionality to the existing
exclude_images
parameter using some new syntax, but it got messy. In the end, seeing as this is for a special case, I thought adding a separateexpert_level=2
parameter was a cleaner approach.