Skip to content
Snippets Groups Projects
Commit 1fe93611 authored by Loïc Le Guyader's avatar Loïc Le Guyader
Browse files

Merge branch 'boz-hist' into 'master'

Fix histogram on data with no saturation value

See merge request !134
parents 1472715b 540f8ebd
No related branches found
No related tags found
1 merge request!134Fix histogram on data with no saturation value
...@@ -524,9 +524,9 @@ def histogram_module(proposalNB, runNB, moduleNB, mask=None): ...@@ -524,9 +524,9 @@ def histogram_module(proposalNB, runNB, moduleNB, mask=None):
w = da.repeat(da.repeat(da.array(mask[None, None, :, :]), w = da.repeat(da.repeat(da.array(mask[None, None, :, :]),
arr.shape[1], axis=1), arr.shape[0], axis=0) arr.shape[1], axis=1), arr.shape[0], axis=0)
w = w.rechunk((100, -1, -1, -1)) w = w.rechunk((100, -1, -1, -1))
return da.bincount(arr.ravel(), w.ravel()).compute() return da.bincount(arr.ravel(), w.ravel(), minlength=512).compute()
else: else:
return da.bincount(arr.ravel()).compute() return da.bincount(arr.ravel(), minlength=512).compute()
def inspect_histogram(proposalNB, runNB, moduleNB, def inspect_histogram(proposalNB, runNB, moduleNB,
......
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