-
Notifications
You must be signed in to change notification settings - Fork 6
Make it easier to change the surface normal in Bragg2DPtycho.from_dataset #63
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
Conversation
allevitan
left a comment
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.
This is really nice, seems like this is a super helpful feature!
Right now, if I'm reading the code right, it's written so that if there is an 'orientation' defined in dataset.sample_info, then that will override the provided surface_normal argument, and the same if a 'scattering_mode' argument is set.
I think it would make the most sense if surface_normal > scattering_mode > dataset.sample_info['orientation'], i.e. an explicitly defined surface_normal overrides everything, a scattering_mode overrides the info in dataset.sample_info, and dataset.sample_info serves as a fallback. Does that make sense?
|
Makes sense to me, and I think that sounds like a good idea. The latest push has this hierarchy implemented. Currently, it's set so that |
… an array with np.asarray, change the check for length-3 to cover all cases, and add a check to explicitly fail if the scattering_mode argument is improperly set, instead of silently falling back to default
|
I just added a few suggested tweaks to the branch, let me know if they look good:
If it looks good, let me know and I can clear my comments and merge it. |
|
Thanks for making these changes; they all look good to me. Would you do the honors of merging? |
Makes the surface normal vector a parameter in Bragg2DPtycho.from_dataset to make it easier for folks to define what the surface normal is.