Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
mantidproject
mantid
Commits
43b3b10a
Commit
43b3b10a
authored
Jan 29, 2021
by
Gagik Vardanyan
Browse files
added tilt rotation for the front bank
parent
8189a705
Changes
2
Hide whitespace changes
Inline
Side-by-side
Framework/DataHandling/src/LoadILLSANS.cpp
View file @
43b3b10a
...
...
@@ -186,6 +186,9 @@ void LoadILLSANS::exec() {
// mm to meter
offset
=
firstEntry
.
getFloat
(
instrumentPath
+
"/Detector 1/dtr1_actual"
);
moveDetectorHorizontal
(
-
offset
/
1000
,
"detector_right"
);
double
angle
=
firstEntry
.
getFloat
(
instrumentPath
+
"/Detector 1/dan1_actual"
);
rotateInstrument
(
-
angle
,
"detector_right"
);
}
else
{
// D11 and D22
...
...
@@ -202,10 +205,6 @@ void LoadILLSANS::exec() {
double
offset
=
m_loadHelper
.
getDoubleFromNexusPath
(
firstEntry
,
instrumentPath
+
"/detector/dtr_actual"
);
moveDetectorHorizontal
(
-
offset
/
1000
,
"detector"
);
// mm to meter
/*TODO: DO NOT ROTATE UNTIL CONFIRMED BY INSTRUMENT SCIENTIST
double angle = m_loader.getDoubleFromNexusPath(
firstEntry, instrumentPath + "/detector/dan_actual");
rotateD22(angle, "detector");*/
}
}
...
...
@@ -220,9 +219,8 @@ void LoadILLSANS::exec() {
void
LoadILLSANS
::
setInstrumentName
(
const
NeXus
::
NXEntry
&
firstEntry
,
const
std
::
string
&
instrumentNamePath
)
{
if
(
instrumentNamePath
.
empty
())
{
std
::
string
message
(
"Cannot set the instrument name from the Nexus file!"
);
g_log
.
error
(
message
);
throw
std
::
runtime_error
(
message
);
throw
std
::
runtime_error
(
"Cannot set the instrument name from the Nexus file!"
);
}
m_instrumentName
=
m_loadHelper
.
getStringFromNexusPath
(
firstEntry
,
instrumentNamePath
+
"/name"
);
...
...
Framework/DataHandling/test/LoadILLSANSTest.h
View file @
43b3b10a
...
...
@@ -224,7 +224,14 @@ public:
double
dtr1_act
=
run
.
getLogAsSingleValue
(
"Detector 1.dtr1_actual"
);
TS_ASSERT_DELTA
(
pos
.
Z
(),
det1_calc
,
1E-6
)
TS_ASSERT_DELTA
(
pos
.
X
(),
-
dtr1_act
/
1000.
,
1E-6
)
TS_ASSERT
(
run
.
hasProperty
(
"Detector 1.dan1_actual"
))
double
dan1_act
=
run
.
getLogAsSingleValue
(
"Detector 1.dan1_actual"
);
double
angle
,
qx
,
qy
,
qz
;
comp
->
getRotation
().
getAngleAxis
(
angle
,
qx
,
qy
,
qz
);
TS_ASSERT_DELTA
(
-
angle
,
dan1_act
,
1E-6
)
TS_ASSERT_EQUALS
(
qx
,
0.
)
TS_ASSERT_EQUALS
(
qy
,
1.
)
TS_ASSERT_EQUALS
(
qz
,
0.
)
checkTimeFormat
(
outputWS
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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