Skip to content

Commit

Permalink
Started to cleanup algorithm. This refs #4303
Browse files Browse the repository at this point in the history
  • Loading branch information
JeanBilheux authored and Janik Zikovsky committed May 1, 2012
1 parent cd25c02 commit 7f00246
Show file tree
Hide file tree
Showing 7 changed files with 400 additions and 122 deletions.
8 changes: 5 additions & 3 deletions Code/Mantid/Framework/Algorithms/src/ResetNegatives.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ namespace Algorithms
/// @copydoc Mantid::API::Algorithm::exec()
void ResetNegatives::exec()
{

// get the minimum for each spectrum
IAlgorithm_sptr alg = this->createSubAlgorithm("Min", 0., .1);
alg->setPropertyValue("InputWorkspace", this->getPropertyValue("InputWorkspace"));
Expand Down Expand Up @@ -145,7 +146,7 @@ namespace Algorithms
// do the actual work
if (this->getProperty("AddMinimum"))
{
this->pushMinimum(minWS, outputWS, prog);
this->pushMinimum(minWS, outputWS, prog);
}
else
{
Expand Down Expand Up @@ -219,8 +220,9 @@ namespace Algorithms
MantidVec & y = wksp->dataY(i);
for (MantidVec::iterator it = y.begin(); it != y.end(); ++it)
{
if (*it < 0.)
*it = value;
if (*it < 0.) {
*it = value;
}
else
*it = fixZero(*it);
}
Expand Down

0 comments on commit 7f00246

Please sign in to comment.