diff --git a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOne.h b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOne.h index 3df25b1a9b96..22d53d41c4f9 100644 --- a/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOne.h +++ b/Code/Mantid/Framework/Algorithms/inc/MantidAlgorithms/ReflectometryReductionOne.h @@ -65,7 +65,7 @@ namespace Mantid const MinMax& wavelengthMinMax, const MinMax& backgroundMinMax, const double& wavelengthStep); /// Convert to an IvsQ workspace. Performs detector positional corrections based on the component name and the theta value. - Mantid::API::MatrixWorkspace_sptr toIvsQ(API::MatrixWorkspace_sptr toConvert, const bool correctPosition, const bool isPointDetector, + Mantid::API::MatrixWorkspace_sptr toIvsQ(API::MatrixWorkspace_sptr toConvert, const bool correctPosition, OptionalDouble& thetaInDeg, Geometry::IComponent_const_sptr sample, Geometry::IComponent_const_sptr detector); private: diff --git a/Code/Mantid/Framework/Algorithms/src/ReflectometryReductionOne.cpp b/Code/Mantid/Framework/Algorithms/src/ReflectometryReductionOne.cpp index af7212bc3132..b6b0e1840d4f 100644 --- a/Code/Mantid/Framework/Algorithms/src/ReflectometryReductionOne.cpp +++ b/Code/Mantid/Framework/Algorithms/src/ReflectometryReductionOne.cpp @@ -81,8 +81,8 @@ namespace Mantid * @param originIndexes : Indexes in terms of the origin workspace * @return WorkspaceIndexes in terms of the host workspace */ - ReflectometryReductionOne::WorkspaceIndexList getIndexesInTermsOf(MatrixWorkspace_const_sptr hostWS, - MatrixWorkspace_sptr originWS, + ReflectometryReductionOne::WorkspaceIndexList getIndexesInTermsOf( + MatrixWorkspace_const_sptr hostWS, MatrixWorkspace_sptr originWS, const ReflectometryReductionOne::WorkspaceIndexList& originIndexes) { auto spectrumMap = hostWS->getSpectrumToWorkspaceIndexMap(); @@ -95,6 +95,16 @@ namespace Mantid return translatedIndexList; } + /** + * Helper method used with the stl to determine whether values are negative + * @param value : Value to check + * @return : True if negative. + */ + bool checkNotPositive(const int value) + { + return value < 0; + } + const std::string multiDetectorAnalysis = "MultiDetectorAnalysis"; const std::string pointDetectorAnalysis = "PointDetectorAnalysis"; } @@ -292,16 +302,6 @@ namespace Mantid return property->isDefault(); } - /** - * Helper method used with the stl to determine whether values are negative - * @param value : Value to check - * @return : True if negative. - */ - bool checkNotPositive(const int value) - { - return value < 0; - } - /** * Get the workspace index list * @return Workspace index list. @@ -765,14 +765,13 @@ namespace Mantid * * @param toConvert : Workspace to convert * @param bCorrectPosition : Flag to indicate that detector positions should be corrected based on the input theta values. - * @param isPointDetector : Flag to indicate that this is a point detector reduction run. * @param thetaInDeg : Theta in Degrees. Used for correction. * @param sample : Sample component * @param detector : Detector component * @return */ Mantid::API::MatrixWorkspace_sptr ReflectometryReductionOne::toIvsQ(API::MatrixWorkspace_sptr toConvert, const bool bCorrectPosition, - const bool isPointDetector, OptionalDouble& thetaInDeg, Geometry::IComponent_const_sptr sample, Geometry::IComponent_const_sptr detector) + OptionalDouble& thetaInDeg, Geometry::IComponent_const_sptr sample, Geometry::IComponent_const_sptr detector) { /* * Can either calculate a missing theta value for the purposes of reporting, or correct positions based on a theta value, @@ -973,7 +972,7 @@ namespace Mantid IvsLam = regionOfInterestWS / regionOfDirectBeamWS; // TODO. This needs checking. } - IvsQ = this->toIvsQ(IvsLam, correctDetctorPositions, isPointDetector, theta, sample, detector); + IvsQ = this->toIvsQ(IvsLam, correctDetctorPositions, theta, sample, detector); setProperty("ThetaOut", theta.get()); setProperty("OutputWorkspaceWavelength", IvsLam); diff --git a/Code/Mantid/Framework/Algorithms/test/ReflectometryReductionOneTest.h b/Code/Mantid/Framework/Algorithms/test/ReflectometryReductionOneTest.h index 6e52ae734da0..b1b7456b1c8b 100644 --- a/Code/Mantid/Framework/Algorithms/test/ReflectometryReductionOneTest.h +++ b/Code/Mantid/Framework/Algorithms/test/ReflectometryReductionOneTest.h @@ -108,8 +108,7 @@ class ReflectometryReductionOneTest: public CxxTest::TestSuite boost::optional theta = 0.7; - MatrixWorkspace_const_sptr inQ = alg.toIvsQ(toConvert, true /*correct position*/, - true /*is point detector*/, theta, sample, detector); + MatrixWorkspace_const_sptr inQ = alg.toIvsQ(toConvert, true /*correct position*/, theta, sample, detector); TS_ASSERT_EQUALS("MomentumTransfer", inQ->getAxis(0)->unit()->unitID());