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

Refs #20796. Fixed compiling error.

parent 391a7332
No related merge requests found
...@@ -231,7 +231,9 @@ int FindPeakBackground::findBackground( ...@@ -231,7 +231,9 @@ int FindPeakBackground::findBackground(
// save endpoints // save endpoints
min_peak = peaks[0].start; min_peak = peaks[0].start;
// extra point for histogram input // extra point for histogram input
max_peak = peaks[0].stop + sizex - sizey; // size_t sizex = inpX.size(); // inpWS->x(inpwsindex).size();
// size_t sizey = inpY.size(); // inpWS->y(inpwsindex).size();
max_peak = peaks[0].stop + inpX.size() - inpY.size();
goodfit = 1; goodfit = 1;
} else { } else {
// assume the whole thing is background // assume the whole thing is background
...@@ -573,28 +575,5 @@ void FindPeakBackground::createOutputWorkspaces() { ...@@ -573,28 +575,5 @@ void FindPeakBackground::createOutputWorkspaces() {
m_outPeakTableWS->appendRow(); m_outPeakTableWS->appendRow();
} }
void FindPeakBackground::findStartStopIndex(size_t &istart, size_t &istop) {
// Generate output
auto inpX = m_histogram->x();
auto inpY = m_histogram->y();
// size_t sizex = inpX.size();
size_t sizey = inpY.size();
// initial value of start and stop x index
size_t n = sizey;
size_t l0 = 0;
if (m_vecFitWindows.size() > 1) {
Mantid::Algorithms::FindPeaks fp;
l0 = fp.getIndex(inpX, m_vecFitWindows[0]);
n = fp.getIndex(inpX, m_vecFitWindows[1]);
if (n < sizey)
n++;
}
istart = l0;
istop = n;
}
} // namespace Algorithms } // namespace Algorithms
} // namespace Mantid } // namespace Mantid
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