Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
D
DITB
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Issue analytics
Insights
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
DISCO Beamline
DITB
Commits
fb95e7c0
Commit
fb95e7c0
authored
Jul 1, 2024
by
Hugo chauvet
Browse files
Options
Downloads
Patches
Plain Diff
add a failback to get_mono_position, bug in MM metadata not recorded
parent
63101c18
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
ditb/io/metadata.py
+7
-1
7 additions, 1 deletion
ditb/io/metadata.py
pyproject.toml
+1
-1
1 addition, 1 deletion
pyproject.toml
with
8 additions
and
2 deletions
ditb/io/metadata.py
+
7
−
1
View file @
fb95e7c0
...
...
@@ -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
'
)
...
...
This diff is collapsed.
Click to expand it.
pyproject.toml
+
1
−
1
View file @
fb95e7c0
...
...
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta"
[project]
name
=
"DITB"
version
=
"20240
526rc2
"
version
=
"20240
701
"
readme
=
"README.md"
requires-python
=
">
=
3.11
"
authors
=
[
{
name
=
"Hugo Chauvet"
,
email
=
"hugo.chauvet@synchrotron-soleil.fr"
}
]
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment