Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
mantid
Manage
Activity
Members
Labels
Plan
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Model registry
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Code review analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
mantidproject
mantid
Commits
a16dc526
Commit
a16dc526
authored
7 years ago
by
Duc Le
Committed by
Gigg, Martyn Anthony
7 years ago
Browse files
Options
Downloads
Patches
Plain Diff
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
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Framework/DataObjects/src/FractionalRebinning.cpp
+4
-3
4 additions, 3 deletions
Framework/DataObjects/src/FractionalRebinning.cpp
with
4 additions
and
3 deletions
Framework/DataObjects/src/FractionalRebinning.cpp
+
4
−
3
View file @
a16dc526
...
...
@@ -479,7 +479,7 @@ void normaliseOutput(MatrixWorkspace_sptr outputWS,
MatrixWorkspace_const_sptr
inputWS
,
boost
::
shared_ptr
<
Progress
>
progress
)
{
const
bool
removeBinWidth
(
inputWS
->
isDistribution
()
&&
in
putWS
->
id
()
!=
"RebinnedOutput"
);
out
putWS
->
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
];
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment