Skip to content
Snippets Groups Projects
Commit a16dc526 authored by Duc Le's avatar Duc Le Committed by Gigg, Martyn Anthony
Browse files

Re #22114 - Slight mods for RB output (inc binwidth in weight)

parent 5812e2cc
No related branches found
No related tags found
No related merge requests found
......@@ -479,7 +479,7 @@ void normaliseOutput(MatrixWorkspace_sptr outputWS,
MatrixWorkspace_const_sptr inputWS,
boost::shared_ptr<Progress> progress) {
const bool removeBinWidth(inputWS->isDistribution() &&
inputWS->id() != "RebinnedOutput");
outputWS->id() != "RebinnedOutput");
for (int64_t i = 0; i < static_cast<int64_t>(outputWS->getNumberHistograms());
++i) {
const auto &outputX = outputWS->x(i);
......@@ -604,10 +604,12 @@ void rebinToFractionalOutput(const Quadrilateral &inputQ,
// Don't do the overlap removal if already RebinnedOutput.
// This wreaks havoc on the data.
double error = inE[j];
if (inputWS->isDistribution() && inputWS->id() != "RebinnedOutput") {
double inputWeight = 1.;
if (inputWS->isDistribution() && !inputRB) {
const double overlapWidth = inX[j + 1] - inX[j];
signal *= overlapWidth;
error *= overlapWidth;
inputWeight = overlapWidth;
}
// The intersection overlap algorithm is relatively costly. The outputQ is
......@@ -630,7 +632,6 @@ void rebinToFractionalOutput(const Quadrilateral &inputQ,
// If the input is a RebinnedOutput workspace with frac. area we need
// to account for the weight of the input bin in the output bin weights
double inputWeight = 1.;
if (inputRB) {
const auto &inF = inputRB->dataF(i);
inputWeight = inF[j];
......
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