From 3a6b6bbaa3db04592c5c96fe0d838f492be4619f Mon Sep 17 00:00:00 2001
From: Wenduo Zhou <zhouw@ornl.gov>
Date: Wed, 19 Feb 2014 13:21:24 -0500
Subject: [PATCH] Added some comments and log output. Refs #9033.

---
 Code/Mantid/Framework/Algorithms/src/FindPeakBackground.cpp | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/Code/Mantid/Framework/Algorithms/src/FindPeakBackground.cpp b/Code/Mantid/Framework/Algorithms/src/FindPeakBackground.cpp
index 5aa647cd5c9..7d437247b10 100644
--- a/Code/Mantid/Framework/Algorithms/src/FindPeakBackground.cpp
+++ b/Code/Mantid/Framework/Algorithms/src/FindPeakBackground.cpp
@@ -238,6 +238,7 @@ namespace Algorithms
       double a0,a1,a2;
       if(peaks.size()> 0)
       {
+        g_log.information() << "Peaks' size = " << peaks.size() << " -> esitmate background. \n";
         if(peaks[peaks.size()-1].stop == 0) peaks[peaks.size()-1].stop = n-1;
         std::sort(peaks.begin(), peaks.end(), by_len());
 
@@ -251,9 +252,12 @@ namespace Algorithms
       else
       {
         // assume background is 12 first and last points
+        g_log.information("Peaks' size = 0 -> zero background.");
         min_peak = l0+12;
         max_peak = n-13;
         if (min_peak > sizey)min_peak = sizey-1;
+        // FIXME : as it is assumed that background is 12 first and 12 last, then
+        //         why not do a simple fit here!
         a0 = 0.0;
         a1 = 0.0;
         a2 = 0.0;
-- 
GitLab