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
da3f0d8f
Commit
da3f0d8f
authored
7 years ago
by
Edward Brown
Browse files
Options
Downloads
Patches
Plain Diff
Re #20991: Updated failing unit tests.
parent
a2fca669
Loading
Loading
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
Framework/Algorithms/test/ReflectometryReductionOneAuto2Test.h
+3
-14
3 additions, 14 deletions
...work/Algorithms/test/ReflectometryReductionOneAuto2Test.h
Framework/Algorithms/test/ReflectometryReductionOneAutoTest.h
+4
-4
4 additions, 4 deletions
...ework/Algorithms/test/ReflectometryReductionOneAutoTest.h
with
7 additions
and
18 deletions
Framework/Algorithms/test/ReflectometryReductionOneAuto2Test.h
+
3
−
14
View file @
da3f0d8f
...
...
@@ -390,7 +390,7 @@ public:
alg
.
setProperty
(
"OutputWorkspace"
,
"IvsQ"
);
alg
.
setProperty
(
"OutputWorkspaceBinned"
,
"IvsQ_binned"
);
alg
.
setProperty
(
"OutputWorkspaceWavelength"
,
"IvsLam"
);
alg
.
setProperty
(
"ProcessingInstructions"
,
"3
:4
"
);
alg
.
setProperty
(
"ProcessingInstructions"
,
"3"
);
alg
.
execute
();
MatrixWorkspace_sptr
corrected
=
alg
.
getProperty
(
"OutputWorkspace"
);
...
...
@@ -408,26 +408,18 @@ public:
TS_ASSERT_EQUALS
(
instIn
->
getComponentByName
(
"linear-detector"
)
->
getPos
(),
instOut
->
getComponentByName
(
"linear-detector"
)
->
getPos
());
// Only 'point-detector'
and 'point-detector2'
should have been moved
// Only 'point-detector' should have been moved
// vertically (along Y)
auto
point1In
=
instIn
->
getComponentByName
(
"point-detector"
)
->
getPos
();
auto
point2In
=
instIn
->
getComponentByName
(
"point-detector2"
)
->
getPos
();
auto
point1Out
=
instOut
->
getComponentByName
(
"point-detector"
)
->
getPos
();
auto
point2Out
=
instOut
->
getComponentByName
(
"point-detector2"
)
->
getPos
();
TS_ASSERT_EQUALS
(
point1In
.
X
(),
point1Out
.
X
());
TS_ASSERT_EQUALS
(
point1In
.
Z
(),
point1Out
.
Z
());
TS_ASSERT_EQUALS
(
point2In
.
X
(),
point2Out
.
X
());
TS_ASSERT_EQUALS
(
point2In
.
Z
(),
point2Out
.
Z
());
TS_ASSERT_DIFFERS
(
point1In
.
Y
(),
point1Out
.
Y
());
TS_ASSERT_DIFFERS
(
point2In
.
Y
(),
point2Out
.
Y
());
TS_ASSERT_DELTA
(
point1Out
.
Y
()
/
(
point1Out
.
Z
()
-
instOut
->
getSample
()
->
getPos
().
Z
()),
std
::
tan
(
theta
*
2
*
M_PI
/
180
),
1e-4
);
TS_ASSERT_DELTA
(
point2Out
.
Y
()
/
(
point2Out
.
Z
()
-
instOut
->
getSample
()
->
getPos
().
Z
()),
std
::
tan
(
theta
*
2
*
M_PI
/
180
),
1e-4
);
}
void
test_override_ThetaIn_without_correcting_detectors
()
{
...
...
@@ -443,7 +435,7 @@ public:
alg
.
setProperty
(
"OutputWorkspace"
,
"IvsQ"
);
alg
.
setProperty
(
"OutputWorkspaceBinned"
,
"IvsQ_binned"
);
alg
.
setProperty
(
"OutputWorkspaceWavelength"
,
"IvsLam"
);
alg
.
setProperty
(
"ProcessingInstructions"
,
"3
:4
"
);
alg
.
setProperty
(
"ProcessingInstructions"
,
"3"
);
alg
.
execute
();
MatrixWorkspace_sptr
corrected
=
alg
.
getProperty
(
"OutputWorkspace"
);
...
...
@@ -454,12 +446,9 @@ public:
// the detectors should not have been moved
auto
point1In
=
instIn
->
getComponentByName
(
"point-detector"
)
->
getPos
();
auto
point2In
=
instIn
->
getComponentByName
(
"point-detector2"
)
->
getPos
();
auto
point1Out
=
instOut
->
getComponentByName
(
"point-detector"
)
->
getPos
();
auto
point2Out
=
instOut
->
getComponentByName
(
"point-detector2"
)
->
getPos
();
TS_ASSERT_EQUALS
(
point1In
,
point1Out
);
TS_ASSERT_EQUALS
(
point2In
,
point2Out
);
}
void
test_sum_transmission_workspaces
()
{
...
...
This diff is collapsed.
Click to expand it.
Framework/Algorithms/test/ReflectometryReductionOneAutoTest.h
+
4
−
4
View file @
da3f0d8f
...
...
@@ -582,7 +582,7 @@ public:
alg
.
setProperty
(
"WavelengthMin"
,
1.0
);
alg
.
setProperty
(
"WavelengthMax"
,
2.0
);
alg
.
setProperty
(
"I0MonitorIndex"
,
0
);
alg
.
setProperty
(
"ProcessingInstructions"
,
"3
,4
"
);
alg
.
setProperty
(
"ProcessingInstructions"
,
"3"
);
alg
.
setProperty
(
"MonitorBackgroundWavelengthMin"
,
0.0
);
alg
.
setProperty
(
"MonitorBackgroundWavelengthMax"
,
1.0
);
alg
.
setProperty
(
"MonitorIntegrationWavelengthMin"
,
0.0
);
...
...
@@ -605,8 +605,8 @@ public:
MatrixWorkspace_sptr
IvsQ
=
alg
.
getProperty
(
"OutputWorkspace"
);
TSM_ASSERT
(
"OutputWorkspace should be a valid matrix workspace"
,
IvsQ
);
TSM_ASSERT_EQUALS
(
"OutputWorkspaceWavelength should have
two
histogram
s
"
,
IvsLam
->
getNumberHistograms
(),
2
);
TSM_ASSERT_EQUALS
(
"OutputWorkspaceWavelength should have
one
histogram"
,
IvsLam
->
getNumberHistograms
(),
1
);
}
void
test_point_detector_run_with_two_transmission_workspaces
()
{
...
...
@@ -616,7 +616,7 @@ public:
alg
.
setProperty
(
"WavelengthMin"
,
1.0
);
alg
.
setProperty
(
"WavelengthMax"
,
2.0
);
alg
.
setProperty
(
"I0MonitorIndex"
,
0
);
alg
.
setProperty
(
"ProcessingInstructions"
,
"3
, 4
"
);
alg
.
setProperty
(
"ProcessingInstructions"
,
"3"
);
alg
.
setProperty
(
"MonitorBackgroundWavelengthMin"
,
0.0
);
alg
.
setProperty
(
"MonitorBackgroundWavelengthMax"
,
1.0
);
alg
.
setProperty
(
"MonitorIntegrationWavelengthMin"
,
0.0
);
...
...
This diff is collapsed.
Click to expand it.
WHITFIELDRE email
@rwp
mentioned in commit
188858e9
·
6 years ago
mentioned in commit
188858e9
mentioned in commit 188858e951d7e6d7715621337d5dd8ca611e756f
Toggle commit list
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