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

add a failback to get_mono_position, bug in MM metadata not recorded

parent 63101c18
Branches
No related tags found
No related merge requests found
......@@ -311,7 +311,13 @@ def get_mono_position(metadata, ichannel=0, excitation_as_z=False):
if excitation_as_z:
return float(metadata[k][0,0,ichannel]['metadata']['Stage-IHR380-Position'])
return float(metadata[k][0,ichannel,0]['metadata']['Stage-IHR380-Position'])
try:
w = float(metadata[k][0,ichannel,0]['metadata']['Stage-IHR380-Position'])
except:
print('Warning missing Stage-IHR380-Position in metadata, use filter name to get excitation w instead')
w = float(re.findall('EX([0-9]*)_', metadata['Summary']['ChNames'][ichannel])[0])
return w
else:
raise NotImplemented('This function is only implemented for zarr format')
......
......@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name = "DITB"
version = "20240526rc2"
version = "20240701"
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