Skip to content

Commit

Permalink
Added one more column in output table workspace. Refs #7789.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzhou committed Apr 7, 2014
1 parent 6fda588 commit 0c56253
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion Code/Mantid/Framework/Algorithms/src/FindPeakBackground.cpp
Expand Up @@ -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();

Expand Down Expand Up @@ -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";
Expand All @@ -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
{
Expand All @@ -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();
Expand Down

0 comments on commit 0c56253

Please sign in to comment.