-
Notifications
You must be signed in to change notification settings - Fork 128
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
Enable user defined sample and container geometry for abs correction #38887
Open
Kvieta1990
wants to merge
10
commits into
main
Choose a base branch
from
abs_can_geo_def
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
+88
−5
Open
Changes from 7 commits
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
0152c97
enable user defined sample and container geometry for abs correction
Kvieta1990 5c9c47a
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] bef9c45
add in release doc
Kvieta1990 d29e357
Merge branch 'abs_can_geo_def' of https://github.com/mantidproject/ma…
Kvieta1990 0f49dc6
fix logic
Kvieta1990 6d50042
fix beam height issue
Kvieta1990 f9ea5f4
[pre-commit.ci] auto fixes from pre-commit.com hooks
pre-commit-ci[bot] ae5325e
remove redundant checks
2daba4b
fix gauge volume issue
aff3d25
container gauge vol definition
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains 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
This file contains 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
1 change: 1 addition & 0 deletions
1
docs/source/release/v6.13.0/Diffraction/Powder/New_features/38887.rst
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
- Enable user defined sample and container geometry together with the definition of gauge volume to account for the beam size. Implementation made in :ref:`SNSPowderReduction <algm-SNSPowderReduction>` and ``mantid.utils.absorptioncorrutils``. |
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.
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 strange in a way similar to the DefineGaugeVolume user docs. I think it is configured that
It would be good to also add in the beam width for the dimension that has that
Adding a comment explaining that will help future people who see this.
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.
The DefineGaugeVolume user docs is indeed a bit confusing in the explanation of how the gauge volume is defined. Here are several comments,
For the cuboid volume definition, I created an image to demonstrate the idea,

Ideally, indeed the gauge volume could be defined as above a a cuboid and Mantid then worries about constructing the intersection area between the sample and the defined gauge volume. However, the construction of the intersection area is not implemented yet. So, we cannot go with this route.
However, the gauge volume can be defined as with the same shape as the sample, e.g., cylinder or hollow cylinder and current implementation can meet our need without problems. We do need some further implementation in this PR to define the gauge volume for the sample and container separately.
The implementation for
SampleOnly
andSampleAndContainer
method is straightforward -- just define the gauge volume twice hereFor the
PaalmanPingsAbsorptionCorrection
method, I am not sure how to do that -- the same principle applies but I am not so familiar with the CPP codes.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.
At ISIS we are also interested in starting to use
DefineGaugeVolume
with other attenuation algorithms such asMonteCarloAbsoption
for use on our engineering beamline ENGIN-X. For us we would need to consider the case of when the gauge volume is not wholly occupied by the sample, both for attenuation correction and normalising by the illuminated sample volume. If you do implement this let us know! Not sure how this fits in with your plans? Happy to discuss!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.
sure. I will keep you updated about the implementation. We do plan to do the gauge volume definition for both the absorption correction and normalization purpose. Currently I am working on this and the PR here is part of the work. Maybe we need another PR for working with implementation for
PaalmanPingsAbsorptionCorrection
which may need the help from @peterfpeterson and his team since I am not so familiar the C++ code and the code architecture there^_^ Anyhow, I will keep you in the loop.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.
There is also the algorithm
SetBeam
which may be appropriate for these calculations. I'm still in progress on understanding the effect of it.