Skip to content
Snippets Groups Projects
Commit 42c26df2 authored by Hugo chauvet's avatar Hugo chauvet
Browse files

correct a bug: need to add white position in filter excitation normalisation

parent 9af33955
No related branches found
No related tags found
No related merge requests found
......@@ -359,8 +359,17 @@ def correct_dark_white(images: str, dark: str = '', white: str = '' ,
diff_im_darks[diff_im_darks < 0 ] = 0
if version == 2:
# Need to find the visible to put it's power to one
i_vis=0
for chan in range(diff_im_darks.shape[2]):
if 'vis' not in img_ch_names[chan].lower():
i_vis = chan
break
print(f'Visible power set to 1 on position {i_vis}')
powerEallfilter = np.insert(powerEstimation, i_vis, 1.0)
# divide the data by the power estimation
diff_im_darks = diff_im_darks / powerEstimation[None, None, :, None, None, None]
diff_im_darks = diff_im_darks / powerEallfilter[None, None, :, None, None, None]
# Compute the transfert function
......
......@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "DITB"
version = "20250115rc1"
version = "20250115rc2"
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