Skip to content
Snippets Groups Projects
Commit 685a2b47 authored by Doucet, Mathieu's avatar Doucet, Mathieu
Browse files

Re #4919 fix stitching for distributions (as opposed to histos)

parent 529c49ee
No related branches found
No related tags found
No related merge requests found
...@@ -248,7 +248,10 @@ class DataSet(object): ...@@ -248,7 +248,10 @@ class DataSet(object):
sum = 0.0 sum = 0.0
sum_err = 0.0 sum_err = 0.0
for i in range(len(y)): for i in range(len(y)):
if x[i]>=xmin and x[i+1]<=xmax: upper_bound = x[i]
if len(x)==len(y)+1:
upper_bound = x[i+1]
if x[i]>=xmin and upper_bound<=xmax:
sum += y[i]/(e[i]*e[i]) sum += y[i]/(e[i]*e[i])
sum_err += 1.0/(e[i]*e[i]) sum_err += 1.0/(e[i]*e[i])
......
...@@ -75,7 +75,7 @@ def counts_vs_pixel_distribution(file_path, is_pixel_y=True, callback=None, ...@@ -75,7 +75,7 @@ def counts_vs_pixel_distribution(file_path, is_pixel_y=True, callback=None,
# The Y pixel numbers start at 1 from the perspective of the users # The Y pixel numbers start at 1 from the perspective of the users
# They also read in reversed order # They also read in reversed order
if is_pixel_y: if False and is_pixel_y:
x=mtd[ws_output].dataX(0) x=mtd[ws_output].dataX(0)
y_reversed=mtd[ws_output].dataY(0) y_reversed=mtd[ws_output].dataY(0)
y=[i for i in y_reversed] y=[i for i in y_reversed]
......
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