Commit 43b3b10a authored by Gagik Vardanyan's avatar Gagik Vardanyan
Browse files

added tilt rotation for the front bank

parent 8189a705
......@@ -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");
......
......@@ -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);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment