From 0c56253689f934315d5c3cfb746a1df4ab9be7be Mon Sep 17 00:00:00 2001 From: Wenduo Zhou <zhouw@ornl.gov> Date: Mon, 7 Apr 2014 15:22:17 -0400 Subject: [PATCH] Added one more column in output table workspace. Refs #7789. --- .../Mantid/Framework/Algorithms/src/FindPeakBackground.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/Code/Mantid/Framework/Algorithms/src/FindPeakBackground.cpp b/Code/Mantid/Framework/Algorithms/src/FindPeakBackground.cpp index de369131d3c..99edc4f2178 100644 --- a/Code/Mantid/Framework/Algorithms/src/FindPeakBackground.cpp +++ b/Code/Mantid/Framework/Algorithms/src/FindPeakBackground.cpp @@ -157,6 +157,7 @@ namespace Algorithms m_outPeakTableWS->addColumn("double", "bkg0"); m_outPeakTableWS->addColumn("double", "bkg1"); m_outPeakTableWS->addColumn("double", "bkg2"); + m_outPeakTableWS->addColumn("int", "GoodFit"); m_outPeakTableWS->appendRow(); @@ -236,6 +237,7 @@ namespace Algorithms } size_t min_peak, max_peak; double a0,a1,a2; + int goodfit; if(peaks.size()> 0) { g_log.debug() << "Peaks' size = " << peaks.size() << " -> esitmate background. \n"; @@ -248,6 +250,7 @@ namespace Algorithms max_peak = peaks[0].stop + sizex - sizey; estimateBackground(inpX, inpY, l0, n, peaks[0].start, peaks[0].stop, a0, a1, a2); + goodfit = 1; } else { @@ -261,11 +264,13 @@ namespace Algorithms a0 = 0.0; a1 = 0.0; a2 = 0.0; + goodfit = -1; } // Add a new row API::TableRow t = m_outPeakTableWS->getRow(0); - t << static_cast<int>(inpwsindex) << static_cast<int>(min_peak) << static_cast<int>(max_peak) << a0 << a1 <<a2; + t << static_cast<int>(inpwsindex) << static_cast<int>(min_peak) << static_cast<int>(max_peak) + << a0 << a1 << a2 << goodfit; } prog.report(); -- GitLab