Skip to content

Compton scattering#775

Merged
saransh13 merged 12 commits intomasterfrom
compton-scattering-transmission
Mar 4, 2025
Merged

Compton scattering#775
saransh13 merged 12 commits intomasterfrom
compton-scattering-transmission

Conversation

@saransh13
Copy link
Copy Markdown
Member

Add functionality to compute Compton scattering intensity on an instrument panel. This is useful for intensity corrections during liquid total scattering analysis. There were two main calculation needed for this:

  1. absorption of the inelastically scattered photons by the sample and window. since the inelastically scattered photons lose energy, the attenuation length is angle dependent.
  2. computation of incoherent scattering intensity for each detector pixel. this is done by interpolating the table in resources/Anomalous.h5.
  3. helper function in `material.utils

There is some special handling needed when the window is None or the thickness is 0, both of which are valid ways to omit the window from the calculation.

@saransh13 saransh13 requested a review from psavery February 27, 2025 19:19
@codecov
Copy link
Copy Markdown

codecov bot commented Feb 27, 2025

Codecov Report

Attention: Patch coverage is 19.20530% with 122 lines in your changes missing coverage. Please review.

Project coverage is 46.48%. Comparing base (dec6393) to head (e90fd6f).
Report is 24 commits behind head on master.

Files with missing lines Patch % Lines
hexrd/instrument/detector.py 16.66% 75 Missing ⚠️
hexrd/material/utils.py 21.66% 47 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master     #775      +/-   ##
==========================================
+ Coverage   45.12%   46.48%   +1.35%     
==========================================
  Files         142      142              
  Lines       22822    22970     +148     
==========================================
+ Hits        10298    10677     +379     
+ Misses      12524    12293     -231     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Signed-off-by: Patrick Avery <patrick.avery@kitware.com>
@saransh13 saransh13 merged commit 0749c34 into master Mar 4, 2025
7 checks passed
@psavery psavery deleted the compton-scattering-transmission branch September 16, 2025 11:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants