From 304ed8cceae765abb2fd9c83a62592fd9b60fa0a Mon Sep 17 00:00:00 2001
From: Vickie Lynch <lynchve@ornl.gov>
Date: Mon, 1 Oct 2018 22:10:46 -0400
Subject: [PATCH] Refs #23614 format fixed for dat files

---
 .../MDAlgorithms/src/IntegratePeaksMD2.cpp      | 17 ++++++-----------
 1 file changed, 6 insertions(+), 11 deletions(-)

diff --git a/Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp b/Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp
index 137718f2510..cf68bd0baca 100644
--- a/Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp
+++ b/Framework/MDAlgorithms/src/IntegratePeaksMD2.cpp
@@ -522,25 +522,20 @@ void IntegratePeaksMD2::integrate(typename MDEventWorkspace<MDE, nd>::sptr ws) {
 
         IFunction_sptr ifun = fitAlgorithm->getProperty("Function");
         if (i == 0) {
+          out << std::setw(20) << "spectrum" << " ";
           for (size_t j = 0; j < ifun->nParams(); ++j)
             out << std::setw(20) << ifun->parameterName(j) << " ";
+          out << std::setw(20) << "chi2" << " ";
           out << "\n";
         }
-        out << std::setw(20) << i << "\n";
+        out << std::setw(20) << i << " ";
         for (size_t j = 0; j < ifun->nParams(); ++j) {
           out << std::setw(20) << std::fixed << std::setprecision(10)
               << ifun->getParameter(j) << " ";
         }
-        out << "\n";
-
-        /*double chi2 = fitAlgorithm->getProperty("OutputChi2overDoF");
-        if (chi2 > 10.0) {
-          if (replaceIntensity) {
-            p.setIntensity(0.0);
-            p.setSigmaIntensity(0.0);
-          }
-          continue;
-        }*/
+        double chi2 = fitAlgorithm->getProperty("OutputChi2overDoF");
+        out << std::setw(20) << std::fixed << std::setprecision(10) << chi2 << "\n";
+
         boost::shared_ptr<const CompositeFunction> fun =
             boost::dynamic_pointer_cast<const CompositeFunction>(ifun);
 
-- 
GitLab