Skip to content

Commit

Permalink
Refs #5224. Don't take out distribution overlap for RebinnedOutput.
Browse files Browse the repository at this point in the history
  • Loading branch information
Michael Reuter committed May 3, 2012
1 parent d64d3bc commit 3dbdf51
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Code/Mantid/Framework/Algorithms/src/Rebin2D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -273,7 +273,9 @@ namespace Mantid
yValue *= weight;
double eValue = inputWS->readE(i)[j] * weight;
const double overlapWidth = overlap.largestX() - overlap.smallestX();
if(inputWS->isDistribution())
// Don't do the overlap removal if already RebinnedOutput.
// This wreaks havoc on the data.
if(inputWS->isDistribution() && inputWS->id() != "RebinnedOutput")
{
yValue *= overlapWidth;
eValue *= overlapWidth;
Expand Down Expand Up @@ -364,7 +366,9 @@ namespace Mantid
m_progress->report("Calculating errors");
const double binWidth = (outputWS->readX(i)[j+1] - outputWS->readX(i)[j]);
double eValue = std::sqrt(outputE[j]);
if( inputWS->isDistribution() )
// Don't do this for a RebinnedOutput workspace. The fractions
// take care of such things.
if( inputWS->isDistribution() && inputWS->id() != "RebinnedOutput")
{
outputY[j] /= binWidth;
eValue /= binWidth;
Expand Down

0 comments on commit 3dbdf51

Please sign in to comment.