From f0aa1e354bba7d02f9c268c6a0443a0c49a09a28 Mon Sep 17 00:00:00 2001 From: Vickie Lynch <lynchve@ornl.gov> Date: Mon, 1 Oct 2018 15:28:16 -0400 Subject: [PATCH] Refs #23614 limits for peak center --- Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp b/Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp index b8e089a2715..5ac1e151f76 100644 --- a/Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp +++ b/Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp @@ -499,9 +499,14 @@ void IntegratePeaksMD2::integrate(typename MDEventWorkspace<MDE, nd>::sptr ws) { std::ostringstream strs; strs << maxPeak[0]; std::string strMax = strs.str(); - if (profileFunction == "Gaussian") myFunc += ", PeakCentre=50, Height="+ strMax; - else if (profileFunction == "BackToBackExponential") myFunc += ", X0=50, I="+ strMax; - else if (profileFunction == "IkedaCarpenterPV") myFunc += ", X0=50, I="+ strMax; + if (profileFunction == "Gaussian") { + myFunc += ", PeakCentre=50, Height="+ strMax; + fitAlgorithm->setProperty("Constraints", "40<f1.PeakCentre<60"); + } + else if (profileFunction == "BackToBackExponential" || profileFunction == "IkedaCarpenterPV") { + myFunc += ", X0=50, I="+ strMax; + fitAlgorithm->setProperty("Constraints", "40<f1.X0<60"); + } fitAlgorithm->setProperty("CalcErrors", true); fitAlgorithm->setProperty("Function", myFunc); fitAlgorithm->setProperty("InputWorkspace", wsProfile2D); -- GitLab