Skip to content
Snippets Groups Projects
Commit d7a5f078 authored by Matt King's avatar Matt King
Browse files

changes to System and Unit tests in regards to re-rotating source

Refs #15136
parent 775678c2
No related branches found
No related tags found
No related merge requests found
......@@ -394,12 +394,17 @@ Mantid::API::MatrixWorkspace_sptr ReflectometryReductionOne::toIvsQ(
// Rotate the source back to its original position
if (rotationTheta != 0.0) {
// for IvsLam Workspace
auto rotateSource = this->createChildAlgorithm("RotateSource");
rotateSource->setChild(true);
rotateSource->initialize();
rotateSource->setProperty("Workspace", toConvert);
rotateSource->setProperty("Angle", -rotationTheta);
rotateSource->execute();
// for IvsQ Workspace
rotateSource->setProperty("Workspace", inQ);
rotateSource->setProperty("Angle", -rotationTheta);
rotateSource->execute();
}
return inQ;
......
......@@ -207,7 +207,7 @@ public:
TS_ASSERT_EQUALS(m_tinyReflWS->getInstrument()->getSource()->getPos(),
outLam->getInstrument()->getSource()->getPos());
TS_ASSERT_DIFFERS(outLam->getInstrument()->getSource()->getPos(),
TS_ASSERT_EQUALS(outLam->getInstrument()->getSource()->getPos(),
outQ->getInstrument()->getSource()->getPos());
}
......@@ -270,8 +270,8 @@ public:
double outTheta = alg->getProperty("ThetaOut");
TS_ASSERT_DELTA(45.0, outTheta, 0.00001);
TS_ASSERT_DIFFERS(source->getPos(),
inQ->getInstrument()->getSource()->getPos())
TS_ASSERT_EQUALS(source->getPos(),
inQ->getInstrument()->getSource()->getPos());
// convert from degrees to radians for sin() function
double outThetaInRadians = outTheta * M_PI / 180;
......
......@@ -33,6 +33,11 @@ class OFFSPECReflRedOneAuto(stresstesting.MantidStressTest):
return True
def validate(self):
'''
we only wish to check the Q-range in this system test. It is not necessary
to check the Instrument definition or Instrument Parameters
'''
self.disableChecking = ["Instrument"]
return ("ivq_75_76_78","OFFSPECReflRedOneAuto_good_v2.nxs")
def requiredFiles(self):
......
......@@ -35,6 +35,11 @@ class OFFSPECReflRedOneAutoPolarizationCorrection(stresstesting.MantidStressTest
return True
def validate(self):
'''
we only wish to check the data from PolarizationCorrection in this system test.
It is not necessary to check the Instrument definition or Instrument Parameters
'''
self.disableChecking = ["Instrument"]
return ("_IvsLam_polCorr", "OFFSPECReflRedOneAutoPolarizationCorrection_good_v2.nxs")
def requiredFiles(self):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment