Conversation
29769c9 to
d345d2b
Compare
backmari
reviewed
Jan 28, 2026
| print("Q summing: %g" % dq_over_q) | ||
| return dq_over_q | ||
| det_res = 1.0 # mm, approximate value for detector resolution contribution | ||
| sigma_pix = pixel_size / np.sqrt(12) |
Collaborator
There was a problem hiding this comment.
can you please add a comment about where factor np.sqrt(12) is coming from?
Collaborator
Author
There was a problem hiding this comment.
if we assume that the pixel can be described by a top-hat function (uniform distribution) then this is the standard deviation. It is an approximation for the real pixel resolution but a reasonable one for now. As we learn and understand more this may evolve!
| slit_distance = s1_sample_distance - sample_si_distance | ||
| dq_over_q = (s1h + sih) * 0.5 / slit_distance / theta | ||
| return dq_over_q | ||
| return dtheta_deg, theta_deg |
Collaborator
There was a problem hiding this comment.
nitpicking here, but could we swap the order to return theta_deg, dtheta_deg throughout this function?
for more information, see https://pre-commit.ci
…mination from logs into a method
effa7f0 to
7d8dff9
Compare
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
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.
Description of work:
Q-resolution calculation updated to include both lambda and theta components. Includes prior functions that weren't integrated into the workflow.
DRAFT - this needs tests to be updated. Request other eyes on the code to check the changes.
Check all that apply:
References:
(Instructions for testing here)
Check list for the reviewer