Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
f09cbba3
Commit
f09cbba3
authored
Jan 21, 2016
by
Lynch, Vickie
Browse files
Refs #14857 fixedd mistake in background correction
parent
a53bc4aa
Changes
2
Hide whitespace changes
Inline
Sidebyside
Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp
View file @
f09cbba3
...
...
@@ 277,8 +277,9 @@ void IntegratePeaksMD2::integrate(typename MDEventWorkspace<MDE, nd>::sptr ws) {
outFile
=
save_path
+
outFile
;
out
.
open
(
outFile
.
c_str
(),
std
::
ofstream
::
out
);
}
// volume of Background sphere
double
volumeBkg
=
4.0
/
3.0
*
M_PI
*
std
::
pow
(
BackgroundOuterRadius
,
3
);
// volume of Background sphere with inner volume subtracted
double
volumeBkg
=
4.0
/
3.0
*
M_PI
*
(
std
::
pow
(
BackgroundOuterRadius
,
3
)

std
::
pow
(
BackgroundOuterRadius
,
3
));
// volume of PeakRadius sphere
double
volumeRadius
=
4.0
/
3.0
*
M_PI
*
std
::
pow
(
PeakRadius
,
3
);
//
...
...
docs/source/algorithms/IntegratePeaksMDv2.rst
View file @
f09cbba3
...
...
@@ 128,35 +128,46 @@ CorrectIfOnEdge option
###################################
This is an extension of what was calculated for the IntegrateIfOnEdge option. It will only be calculated if this option
is true and
for the background
is true and
the minimum dv is less than PeakRadius or BackgroundOuterRadius.
:math:`\leftdv\right<BackgroundOuterRadius`
For the background if
:math:`
h =
BackgroundOuterRadius
 \leftdv\right
`
:math:`
\leftdv\right_{min}<
BackgroundOuterRadius`
:math:`
r
= BackgroundOuterRadius`
:math:`
h
= BackgroundOuterRadius
 \leftdv\right_{min}
`
or for the peak (assume that
the s
hap
e is
Gaussian)
From the minimum of dv the volume of the cap of
the s
pher
e is
found:
:math:`
\leftdv\right<Peak
Radius`
:math:`
V_{cap} = \pi h^2 / 3 (3 * BackgroundOuter
Radius
 h)
`
:math:`\sigma = PeakRadius / 3`
The volume of the total sphere is calculated and for the background the volume of the inner radius must be subtracted:
:math:`V_{shell} = 4/3 \pi (BackgroundOuterRadius^3  BackgroundInnerRadius^3)`
The integrated intensity is multiplied by the ratio of the volume of the sphere divided by the volume where data was collected
:math:`h = PeakRadius * exp(\leftdv\right^2 / (2 \sigma^2)`
:math:`I_{bkgMultiplier} = V_{shell} / (V_{shell}  V_{cap})`
For the peak assume that the shape is Gaussian. If
:math:`\leftdv\right_{min}<PeakRadius`
:math:`\sigma = PeakRadius / 3`
:math:`
r
= PeakRadius`
:math:`
h
= PeakRadius
* exp(\leftdv\right_{min}^2 / (2 \sigma^2)
`
T
he minimum of dv
is calculated for each peak and from that value
the volume of the cap of the sphere is found:
From t
he minimum of dv the volume of the cap of the sphere is found:
:math:`V_{cap} = \pi h^2 / 3 (3
r
 h)`
:math:`V_{cap} = \pi h^2 / 3 (3
* PeakRadius
 h)`
and the volume of the sphere is calculated
:math:`V_{sphere} = 4/3 \pi
r
^3`
:math:`V_{sphere} = 4/3 \pi
PeakRadius
^3`
The integrated intensity is multiplied by the ratio of the volume of the sphere divided by the volume where data was collected
:math:`I_{
m
ultiplier} = V_{sphere} / (V_{sphere}  V_{cap})`
:math:`I_{
peakM
ultiplier} = V_{sphere} / (V_{sphere}  V_{cap})`
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment