Skip to content

Commit

Permalink
Ignore super wide peaks. Refs #7001.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzhou committed Jun 13, 2013
1 parent 86e6cd7 commit 2104bf1
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions Code/Mantid/Framework/Algorithms/src/StripPeaks.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,17 @@ API::MatrixWorkspace_sptr StripPeaks::removePeaks(API::MatrixWorkspace_const_spt
}
if ( chisq > m_maxChiSq)
{
if (chisq != 1.e10)
g_log.error() << "StripPeaks(): Peak Index = " << i << " @ " << centre
<< " Error: Peak fit with too high of chisq " << chisq << " > " << m_maxChiSq << "\n";
if (chisq != DBL_MAX)
g_log.error() << "StripPeaks(): Peak Index = " << i << " @ X = " << centre
<< " Error: Peak fit with too high of chisq " << chisq << " > " << m_maxChiSq << "\n";
continue;
}
else if (chisq <= 0.)
{
g_log.warning() << "StripPeaks(): Peak Index = " << i << " @ X = " << centre
<< ". Error: Peak fit with too wide peak width" << width
<< " denoted by chi^2 = " << chisq << " <= 0. \n";
}

g_log.debug() << "Subtracting peak " << i << " from spectrum " << peakslist->getRef<int>("spectrum",i)
<< " at x = " << centre << " h = " << height << " s = " << width << " chi2 = " << chisq << "\n";
Expand Down

0 comments on commit 2104bf1

Please sign in to comment.