Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
5bff5c44
Commit
5bff5c44
authored
9 years ago
by
Lynch, Vickie
Browse files
Options
Downloads
Patches
Plain Diff
Refs #11435 test adaptive Q integration
parent
29d1a3b2
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Code/Mantid/Framework/MDAlgorithms/test/IntegratePeaksMD2Test.h
+12
-1
12 additions, 1 deletion
...antid/Framework/MDAlgorithms/test/IntegratePeaksMD2Test.h
with
12 additions
and
1 deletion
Code/Mantid/Framework/MDAlgorithms/test/IntegratePeaksMD2Test.h
+
12
−
1
View file @
5bff5c44
...
...
@@ -62,7 +62,7 @@ public:
/** Run the IntegratePeaksMD2 with the given peak radius integration param */
static
void
doRun
(
double
PeakRadius
,
double
BackgroundRadius
,
std
::
string
OutputWorkspace
=
"IntegratePeaksMD2Test_peaks"
,
double
BackgroundStartRadius
=
0.0
,
bool
edge
=
true
,
bool
cyl
=
false
,
std
::
string
fnct
=
"NoFit"
)
double
BackgroundStartRadius
=
0.0
,
bool
edge
=
true
,
bool
cyl
=
false
,
std
::
string
fnct
=
"NoFit"
,
double
adaptive
=
0.0
)
{
IntegratePeaksMD2
alg
;
TS_ASSERT_THROWS_NOTHING
(
alg
.
initialize
()
)
...
...
@@ -79,6 +79,8 @@ public:
TS_ASSERT_THROWS_NOTHING
(
alg
.
setProperty
(
"PercentBackground"
,
20.0
)
);
TS_ASSERT_THROWS_NOTHING
(
alg
.
setProperty
(
"ProfileFunction"
,
fnct
)
);
TS_ASSERT_THROWS_NOTHING
(
alg
.
setProperty
(
"IntegrationOption"
,
"Sum"
)
);
TS_ASSERT_THROWS_NOTHING
(
alg
.
setProperty
(
"AdaptiveQMultiplier"
,
adaptive
)
);
if
(
adaptive
>
0.0
)
TS_ASSERT_THROWS_NOTHING
(
alg
.
setProperty
(
"AdaptiveQBackground"
,
true
)
);
TS_ASSERT_THROWS_NOTHING
(
alg
.
execute
()
);
TS_ASSERT
(
alg
.
isExecuted
()
);
}
...
...
@@ -180,6 +182,15 @@ public:
// Error is also calculated
TS_ASSERT_DELTA( peakWS0->getPeak(0).getSigmaIntensity(), sqrt(2.0), 1e-2);*/
// ------------- Adaptive Integration r=MQ+b where b is PeakRadius and m is 0.01 ------------------------
peakWS0
->
addPeak
(
Peak
(
inst
,
15050
,
1.0
,
V3D
(
2.
,
3.
,
4.
)
)
);
doRun
(
0.1
,
0.0
,
"IntegratePeaksMD2Test_peaks"
,
0.0
,
true
,
false
,
"NoFit"
,
0.01
);
TS_ASSERT_DELTA
(
peakWS0
->
getPeak
(
1
).
getIntensity
(),
29.0
,
1e-2
);
// Error is also calculated
TS_ASSERT_DELTA
(
peakWS0
->
getPeak
(
1
).
getSigmaIntensity
(),
sqrt
(
29.0
),
1e-2
);
// ------------- Integrate with 0.1 radius but IntegrateIfOnEdge false------------------------
doRun
(
0.1
,
0.0
,
"IntegratePeaksMD2Test_peaks"
,
0.0
,
false
);
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment