diff --git a/Framework/API/test/RunTest.h b/Framework/API/test/RunTest.h index caaf5d0a9dbb0fb1f7f8776784e6b89ae554bd8c..a41f319a7eae852b0a4d9b5ebdca618e2a06d844 100644 --- a/Framework/API/test/RunTest.h +++ b/Framework/API/test/RunTest.h @@ -630,7 +630,6 @@ public: } void test_Accessing_Single_Value_From_Times_Series_A_Large_Number_Of_Times() { - double value(0.0); for (size_t i = 0; i < 20000; ++i) { m_testRun.getPropertyAsSingleValue(m_propName); } diff --git a/Framework/Algorithms/test/RingProfileTest.h b/Framework/Algorithms/test/RingProfileTest.h index 6081a76e993d90b2bbac0274bee8d79df6a4cca4..3580725c7c232e49a8c2d9a46b817019a8aa22ef 100644 --- a/Framework/Algorithms/test/RingProfileTest.h +++ b/Framework/Algorithms/test/RingProfileTest.h @@ -39,6 +39,14 @@ public: const std::invalid_argument &); // centre must be 2 or 3 values (x,y) or (x,y,z) + std::vector<double> justOne(1); + justOne[0] = -0.35; + TS_ASSERT_THROWS(alg.setProperty("Centre", justOne), + const std::invalid_argument &); + + std::vector<double> fourInputs(4, -0.45); + TS_ASSERT_THROWS(alg.setProperty("Centre", fourInputs), + const std::invalid_argument &); TS_ASSERT_THROWS_NOTHING( alg.setPropertyValue("OutputWorkspace", outWSName)); @@ -140,9 +148,8 @@ public: return goodWS; } - void configure_ring_profile(RingProfile &alg, - const MatrixWorkspace_sptr &inws, - const std::vector<double> ¢re, int num_bins, + void configure_ring_profile(RingProfile &alg, MatrixWorkspace_sptr inws, + std::vector<double> centre, int num_bins, double start_angle = 0, double min_radius = 0, double max_radius = 1000, bool anticlock = true) { TS_ASSERT_THROWS_NOTHING(alg.initialize()); diff --git a/Framework/Crystal/src/PeakAlgorithmHelpers.cpp b/Framework/Crystal/src/PeakAlgorithmHelpers.cpp index 6d01489f6c8382ddfd3e558018462e0c98671b0a..684e7601304f58702079624c55c1ecc7c4ca30a7 100644 --- a/Framework/Crystal/src/PeakAlgorithmHelpers.cpp +++ b/Framework/Crystal/src/PeakAlgorithmHelpers.cpp @@ -203,6 +203,8 @@ generateOffsetVectors(const std::vector<double> &hOffsets, std::transform( lOffsets.begin(), lOffsets.end(), std::back_inserter(offsets), [&hOffset, &kOffset](double lOffset) { + // it's not quite clear how to interpret them as mnp + // indices so set to 0, 0, 0 return std::make_tuple(0, 0, 0, V3D(hOffset, kOffset, lOffset)); }); } diff --git a/Framework/CurveFitting/src/CostFunctions/CostFuncFitting.cpp b/Framework/CurveFitting/src/CostFunctions/CostFuncFitting.cpp index d458a539489e5b3d15bd4f175c6ea73d8c4d3627..9e8effe85843fa83c130c278c0f6ebdb2306fd01 100644 --- a/Framework/CurveFitting/src/CostFunctions/CostFuncFitting.cpp +++ b/Framework/CurveFitting/src/CostFunctions/CostFuncFitting.cpp @@ -136,7 +136,7 @@ void CostFuncFitting::calActiveCovarianceMatrix(GSLMatrix &covar, m_function->functionDeriv(*m_domain, J); // let the GSL to compute the covariance matrix - gsl_multifit_covar(J.getJ(), epsrel, covar.gsl()); + gsl_multifit_covar(j, epsrel, covar.gsl()); } /** Calculates covariance matrix diff --git a/Framework/CurveFitting/test/Algorithms/LeBailFitTest.h b/Framework/CurveFitting/test/Algorithms/LeBailFitTest.h index 1977a54d00df4fa38490b93b4e7a196afb47fb6b..b43f134bd99af16ab150437afcc38ca9e24d8cd2 100644 --- a/Framework/CurveFitting/test/Algorithms/LeBailFitTest.h +++ b/Framework/CurveFitting/test/Algorithms/LeBailFitTest.h @@ -424,47 +424,6 @@ API::MatrixWorkspace_sptr generateArgSiPeak220() { return dataws; } -//---------------------------------------------------------------------------------------------- -/** Import data from a column data file - */ -void importDataFromColumnFile(const std::string &filename, - const std::string &wsname) { - DataHandling::LoadAscii2 load; - load.initialize(); - - load.setProperty("FileName", filename); - load.setProperty("OutputWorkspace", wsname); - load.setProperty("Separator", "Automatic"); - load.setProperty("Unit", "TOF"); - - load.execute(); - if (!load.isExecuted()) { - stringstream errss; - errss << "Data file " << filename << " cannot be opened. "; - std::cout << errss.str() << '\n'; - throw std::runtime_error(errss.str()); - } - - MatrixWorkspace_sptr ws = boost::dynamic_pointer_cast<MatrixWorkspace>( - AnalysisDataService::Instance().retrieve(wsname)); - if (!ws) { - stringstream errss; - errss << "LoadAscii failed to generate workspace"; - std::cout << errss.str() << '\n'; - throw std::runtime_error(errss.str()); - } - - // Set error - const MantidVec &vecY = ws->readY(0); - MantidVec &vecE = ws->dataE(0); - size_t numpts = vecY.size(); - for (size_t i = 0; i < numpts; ++i) { - vecE[i] = std::max(1.0, sqrt(vecY[i])); - } - - return; -} - //---------------------------------------------------------------------------------------------- /** Create data workspace without background */