From c0ec79c8dec44b257b8e68621eac9043d0acfadf Mon Sep 17 00:00:00 2001 From: Dan Nixon <dan@dan-nixon.com> Date: Tue, 24 Mar 2015 13:25:31 +0000 Subject: [PATCH] Also add Shift to DiffRotDiscreteCircle Also had same issue, may as well fix here Refs #10189 --- .../Framework/CurveFitting/src/DiffRotDiscreteCircle.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Code/Mantid/Framework/CurveFitting/src/DiffRotDiscreteCircle.cpp b/Code/Mantid/Framework/CurveFitting/src/DiffRotDiscreteCircle.cpp index 1c2042fbdee..c814e613c3c 100644 --- a/Code/Mantid/Framework/CurveFitting/src/DiffRotDiscreteCircle.cpp +++ b/Code/Mantid/Framework/CurveFitting/src/DiffRotDiscreteCircle.cpp @@ -54,6 +54,7 @@ InelasticDiffRotDiscreteCircle::InelasticDiffRotDiscreteCircle() declareParameter("Decay", 1.0, "Inverse of transition rate, in nanoseconds " "if energy in micro-ev, or picoseconds if " "energy in mili-eV"); + declareParameter("Shift", 0.0, "Shift in domain"); declareAttribute("Q", API::IFunction::Attribute(0.5)); declareAttribute("N", API::IFunction::Attribute(3)); @@ -82,6 +83,7 @@ void InelasticDiffRotDiscreteCircle::function1D(double *out, const double rate = m_hbar / getParameter("Decay"); // micro-eV or mili-eV const double Q = getAttribute("Q").asDouble(); const int N = getAttribute("N").asInt(); + const double S = getParameter("Shift"); std::vector<double> sph(N); for (int k = 1; k < N; k++) { @@ -97,7 +99,7 @@ void InelasticDiffRotDiscreteCircle::function1D(double *out, } for (size_t i = 0; i < nData; i++) { - double w = xValues[i]; + double w = xValues[i] - S; double S = 0.0; for (int l = 1; l < N; l++) // l goes up to N-1 { -- GitLab