Skip to content
Snippets Groups Projects
Commit 3a6b6bba authored by Zhou, Wenduo's avatar Zhou, Wenduo
Browse files

Added some comments and log output. Refs #9033.

parent ec6563c3
No related merge requests found
...@@ -238,6 +238,7 @@ namespace Algorithms ...@@ -238,6 +238,7 @@ namespace Algorithms
double a0,a1,a2; double a0,a1,a2;
if(peaks.size()> 0) 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; if(peaks[peaks.size()-1].stop == 0) peaks[peaks.size()-1].stop = n-1;
std::sort(peaks.begin(), peaks.end(), by_len()); std::sort(peaks.begin(), peaks.end(), by_len());
...@@ -251,9 +252,12 @@ namespace Algorithms ...@@ -251,9 +252,12 @@ namespace Algorithms
else else
{ {
// assume background is 12 first and last points // assume background is 12 first and last points
g_log.information("Peaks' size = 0 -> zero background.");
min_peak = l0+12; min_peak = l0+12;
max_peak = n-13; max_peak = n-13;
if (min_peak > sizey)min_peak = sizey-1; 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; a0 = 0.0;
a1 = 0.0; a1 = 0.0;
a2 = 0.0; a2 = 0.0;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment