Skip to content
Snippets Groups Projects
Commit b40a73a2 authored by Hugo CHAUVET's avatar Hugo CHAUVET :bicyclist:
Browse files

Add clip to data in normalize_dark_white

parent c054cc86
Branches
No related tags found
No related merge requests found
......@@ -119,6 +119,10 @@ def normalize_dark_white(image_stack: arraytype, dark_stack: arraytype,
diffdark[diffdark < 0] = 0
normed = diffdark / norm_beam
# Need to clip data so that they will not exceed 1
normed = normed.clip(0,1)
if normed.dtype != np.uint16:
if isinstance(normed, da.Array):
normed = normed.map_blocks(img_as_uint)
......
......@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "DITB"
version = "20240311rc12"
version = "20240311rc13"
readme = "README.md"
requires-python = ">=3.11"
authors = [{ name = "Hugo Chauvet", email = "hugo.chauvet@synchrotron-soleil.fr" }]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment