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
715f3780
Commit
715f3780
authored
Jan 30, 2020
by
Mathieu Tillet
Browse files
Updated tests to reflect changes
parent
c0a1376e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Framework/DataHandling/test/LoadILLSANSTest.h
View file @
715f3780
...
...
@@ -154,8 +154,8 @@ public:
V3D
pos
=
component
->
getPos
();
V3D
origin
(
0
,
0
,
0
);
TS_ASSERT_DELTA
(
pos
.
distance
(
origin
),
1
,
1E-5
);
TS_ASSERT_DELTA
(
pos
.
X
(),
0.17365
,
1E-5
);
// sin(10)
TS_ASSERT_DELTA
(
pos
.
Z
(),
0.98481
,
1E-5
);
// cos(10)
TS_ASSERT_DELTA
(
pos
.
X
(),
-
0.17365
,
1E-5
);
// sin(10)
TS_ASSERT_DELTA
(
pos
.
Z
(),
0.98481
,
1E-5
);
// cos(10)
Mantid
::
detid_t
bl_id
,
tr_id
;
instrument
->
getMinMaxDetectorIDs
(
bl_id
,
tr_id
);
...
...
@@ -163,27 +163,27 @@ public:
detid2det_map
det_map
;
instrument
->
getDetectors
(
det_map
);
IDetector_const_sptr
bottom_
lef
t_pixel
=
det_map
[
bl_id
];
IDetector_const_sptr
top_
righ
t_pixel
=
det_map
[
320
*
320
-
1
];
IDetector_const_sptr
bottom_
righ
t_pixel
=
det_map
[
bl_id
];
IDetector_const_sptr
top_
lef
t_pixel
=
det_map
[
320
*
320
-
1
];
V3D
b
l
_pos
=
bottom_
lef
t_pixel
->
getPos
();
V3D
t
r
_pos
=
top_
righ
t_pixel
->
getPos
();
V3D
b
r
_pos
=
bottom_
righ
t_pixel
->
getPos
();
V3D
t
l
_pos
=
top_
lef
t_pixel
->
getPos
();
// check the detector has 10 degrees angle
TS_ASSERT_DELTA
(
b
l
_pos
.
distance
(
origin
),
1.02512
,
1E-5
);
TS_ASSERT_DELTA
(
t
r
_pos
.
distance
(
origin
),
1.02512
,
1E-5
);
TS_ASSERT_DELTA
(
b
r
_pos
.
distance
(
origin
),
1.02512
,
1E-5
);
TS_ASSERT_DELTA
(
t
l
_pos
.
distance
(
origin
),
1.02512
,
1E-5
);
TS_ASSERT_DELTA
(
t
r
_pos
.
X
(),
0.33073
,
1E-5
);
TS_ASSERT_DELTA
(
t
r
_pos
.
Z
(),
0.95711
,
1E-5
);
TS_ASSERT_DELTA
(
b
l
_pos
.
X
(),
0.01657
,
1E-5
);
TS_ASSERT_DELTA
(
b
l
_pos
.
Z
(),
1.01250
,
1E-5
);
TS_ASSERT_DELTA
(
t
l
_pos
.
X
(),
-
0.33073
,
1E-5
);
TS_ASSERT_DELTA
(
t
l
_pos
.
Z
(),
0.95711
,
1E-5
);
TS_ASSERT_DELTA
(
b
r
_pos
.
X
(),
-
0.01657
,
1E-5
);
TS_ASSERT_DELTA
(
b
r
_pos
.
Z
(),
1.01250
,
1E-5
);
const
auto
&
xAxis
=
outputWS
->
x
(
0
).
rawData
();
const
auto
&
spec
=
outputWS
->
y
(
51972
).
rawData
();
const
auto
&
err
=
outputWS
->
e
(
51972
).
rawData
();
TS_ASSERT_EQUALS
(
xAxis
.
size
(),
2
)
TS_ASSERT_DELTA
(
xAxis
[
0
],
6.65
,
1E-3
)
TS_ASSERT_DELTA
(
xAxis
[
1
],
7.35
,
1E-3
)
TS_ASSERT_DELTA
(
xAxis
[
0
],
6.
9
65
,
1E-3
)
TS_ASSERT_DELTA
(
xAxis
[
1
],
7.
0
35
,
1E-3
)
TS_ASSERT_EQUALS
(
spec
[
0
],
17
)
TS_ASSERT_DELTA
(
err
[
0
],
sqrt
(
17
),
1E-5
)
}
...
...
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