-
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
Add sample to source distance to Beam #622
Add sample to source distance to Beam #622
Conversation
…ded missing beam params to beam_phil_scope. Added tests for PolyBeam.
…ensure it overrides Beam.is_similar_to rather than just overloading it.
…/dxtbx into add_polychromatic_beam
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## main #622 +/- ##
==========================================
- Coverage 39.10% 38.12% -0.99%
==========================================
Files 181 182 +1
Lines 15864 16270 +406
Branches 3066 3161 +95
==========================================
- Hits 6204 6203 -1
- Misses 9074 9481 +407
Partials 586 586 |
@toastisme not a criticism, but I make the comment without an implication of what is or is not correct |
Would it make sense to start returning a |
I suggest changing name to |
…ied BeamFactory.from_dict logic.
…/dxtbx into add_polychromatic_beam
…add_sample_to_source_distance
Without this, dxtbx did not work as a subdirectory in a larger CMakeLists project.
Okay, fixing this merge conflict was significantly more involved than I had expected. The fact that the Polybeam PR was merged (and this branch was on top of an earlier, before-rename, version of that branch) and that the Probe PR also touches many of the same places as this, caused git to get extremely confused. (I think a "clever" approach I tried early also turned out to be "the most difficult path"). I think this is okay, but not confident enough to merge. @toastisme, could you look over and make sure this updated branch makes sense? |
Ah what a mess. Thanks for sorting this out. Looks good to me. |
…ce in BeamFactory.make_polychromatic_beam. Made sample_to_source_distance have default value of zero for exposed Python constructors. Added sample_to_source_distance to beam tests.
* Add sample_to_source_distance to Beam --------- Co-authored-by: DiamondLightSource-build-server <DiamondLightSource-build-server@users.noreply.github.com> Co-authored-by: Nicholas Devenish <ndevenish@gmail.com>
This adds
sample_to_source_distance_in_m
toBeam
. This is required for time-of-flight experiments (to actually calculate the time-of-flight), but I thought it could potentially be useful in other experiments (e.g. an alternative beam divergence model), so have added it toBeam
rather than a derived class.This also adds some additional
Beam
similarity checks that were missing.This branches off of #621.