-
Notifications
You must be signed in to change notification settings - Fork 22
Add time-of-flight beam #492
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
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…y. Added type hints to BeamFactory.
…ecific to an X-ray experiment.
Codecov Report
@@ Coverage Diff @@
## main #492 +/- ##
==========================================
+ Coverage 40.91% 41.08% +0.16%
==========================================
Files 176 176
Lines 15528 15619 +91
Branches 2795 2822 +27
==========================================
+ Hits 6354 6417 +63
- Misses 8618 8629 +11
- Partials 556 573 +17 |
Collaborator
|
@toastisme going to revisit this context shortly |
Collaborator
|
Will recreate with newer versions of code. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This adds a time-of-flight beam object (
TOFBeam) to dxtbx, to allow for neutron time-of-flight Laue experiments.TOFBeamderives fromBeam, and differs in that it has asample_to_moderator_distanceand does not have an explicit monochromatic wavelength. To satisfy theBeamBaseinterface it still hasset_wavelengthandset_s0methods, which raise exceptions. This is a code smell, but is a trade off to prevent needing to modify theBeamBaseinterface and having dynamic casting downstream etc. TheBeamBaseget_wavelengthandget_s0methods are satisfied by allowing aTOFBeamto store a given reflection (only through required values to avoid dependency on DIALS), thereby giving it a wavelength and s0.To account for multiple beam types a
TOFBeamFactoryhas been added, which conforms to a general beam factory interface outlined inAbstractBeamFactory.BeamBaseFactoryhas also been added, which chooses betweenTOFBeamFactoryBeamFactorybased on input.