Skip to content
Snippets Groups Projects
Commit 9ae2141c authored by Peter Parker's avatar Peter Parker
Browse files

Refs #8028 - Ensure that X values are carried over to alg result.

* Add setX() line as per Russell's suggestion.
* Cover the X data with a unit test.
parent 745e87f2
No related branches found
No related tags found
No related merge requests found
...@@ -83,6 +83,8 @@ void PointByPointVCorrection::exec() ...@@ -83,6 +83,8 @@ void PointByPointVCorrection::exec()
PARALLEL_START_INTERUPT_REGION PARALLEL_START_INTERUPT_REGION
const MantidVec& X=inputWS1->readX(i); const MantidVec& X=inputWS1->readX(i);
outputWS->setX( i, inputWS1->refX(i) );
const MantidVec& Y1=inputWS1->readY(i); const MantidVec& Y1=inputWS1->readY(i);
const MantidVec& Y2=inputWS2->readY(i); const MantidVec& Y2=inputWS2->readY(i);
const MantidVec& E1=inputWS1->readE(i); const MantidVec& E1=inputWS1->readE(i);
......
...@@ -51,6 +51,9 @@ public: ...@@ -51,6 +51,9 @@ public:
TS_ASSERT_THROWS_NOTHING( output = AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>("out") ); TS_ASSERT_THROWS_NOTHING( output = AnalysisDataService::Instance().retrieveWS<MatrixWorkspace>("out") );
// Check a few values // Check a few values
TS_ASSERT_DELTA( output->readX(1)[4], 6.5, 0.0001 );
TS_ASSERT_DELTA( output->readX(1)[1], 2.0, 0.0001 );
TS_ASSERT_DELTA( output->readX(0)[0], 0.5, 0.000001 );
TS_ASSERT_DELTA( output->readY(1)[4], 2.9999, 0.0001 ); TS_ASSERT_DELTA( output->readY(1)[4], 2.9999, 0.0001 );
TS_ASSERT_DELTA( output->readY(1)[1], 2.9999, 0.0001 ); TS_ASSERT_DELTA( output->readY(1)[1], 2.9999, 0.0001 );
TS_ASSERT_DELTA( output->readY(0)[0], 2.0, 0.000001 ); TS_ASSERT_DELTA( output->readY(0)[0], 2.0, 0.000001 );
......
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