-
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
dials.sweep_to_stills #917
Conversation
….import If False, skip the check reference detector step. Useful when the known headers are very wrong, such as the pixel size is off.
Converts a sweep to a series of stills by using the goniometer and scan to create a stills Experiment for every scan point in the scan. Includes an oscillation_angle/2 offset to the A matrices to account for how scans are recorded in DIALS. Also includes reflection splitting. Idea is that the indexed reflections from the sweep need to be split into slices so that each experiment gets all the spots that impinged on it, even if the centroid is on the next phi step. Co-authored-by: Kevin Dalton <kevinmdalton@gmail.com>
The functionality sounds useful. Please include tests in this repository for any new command line programs. |
I'm curious what specifically this is useful for? Also, it'd be great if you could add a |
Please see the program boilerplate for an updated template for new tools. |
Some electron diffraction datasets (such as the one described in this paper) were collected as a series of discrete tilt steps on a single crystal. You could index and refine the whole dataset as a sweep, but would want to convert to stills for integration. I imagine the LBL use case is something different though. It would be interesting to hear what that is. |
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.
As per other comments:
- Please add a test for this new command line program
- Please could you avoid using the outdated
Script()
way of writing command line programs
I've also added a few comments/suggestions inline with the changes.
Thanks all, I've addressed as many code review comments as I can for right now. Was particularly pleased about using set_A directly. Thanks @rjgildea. I don't have time to fix the boiler point stuff now, sorry. I'll send more about the usecase particulars when I can. Appreciate the curiosity :) |
(I'll merge tomorrow if that's ok) |
- Split class __init__ and run() to more standard run (which loads the arguments from command line and writes the data back out) and sweep_to_stills (which transforms the data). This makes it easier to use programatically from code. - Remove redundant set_dispatcher_name - Remove shebang - Use program name in help string directly - use sys.exit so that exit code is set on bad input - Use docstring instead of separate help_message
I've updated to use the more modern layout. This touches a lot, because mainly it's just removing the class and therefore a level of indentation (A "Script" class that you just instantiate and instantly call is no better than a function in python) - but also splits into a Doing it here means that when you squash-merge it'll maintain all the attribution to your commit. |
I've also added the feature note for the CHANGELOG |
Thanks @ndevenish |
New program: dials.sweep_to_stills
Converts a sweep to a series of stills by using the goniometer and scan to create a stills Experiment for every scan point in the scan. Includes an oscillation_angle/2 offset to the A matrices to account for how scans are recorded in DIALS.
Also includes reflection splitting. Idea is that the indexed reflections from the sweep need to be split into slices so that each experiment gets all the spots that impinged on it, even if the centroid is on the next phi step.
Also also adds parameter check_reference_geometry=True, expert_level=2, to dials.import