Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
L
Live integration
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Koziej Lab
X-ray Diffraction
PDF
Live integration
Commits
1dc0d3cc
Commit
1dc0d3cc
authored
2 weeks ago
by
Gröne, Tjark Leon Raphael
Browse files
Options
Downloads
Patches
Plain Diff
Update file maxwell_integrate_to_h5.py
parent
51dc5ce6
Branches
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
maxwell_integrate_to_h5.py
+113
-105
113 additions, 105 deletions
maxwell_integrate_to_h5.py
with
113 additions
and
105 deletions
maxwell_integrate_to_h5.py
+
113
−
105
View file @
1dc0d3cc
...
@@ -267,6 +267,8 @@ def integrate_ims_in_dir(path_im, path_int, dtype_im=".tif", dtype_int=".dat"):
...
@@ -267,6 +267,8 @@ def integrate_ims_in_dir(path_im, path_int, dtype_im=".tif", dtype_int=".dat"):
# Create a new entry for each scan
# Create a new entry for each scan
entry
=
h5
.
create_group
(
entry_name
)
entry
=
h5
.
create_group
(
entry_name
)
try
:
entry
[
"
title
"
]
=
"
Collected Q-I scans
"
entry
[
"
title
"
]
=
"
Collected Q-I scans
"
entry
.
attrs
[
"
NX_class
"
]
=
"
NXentry
"
entry
.
attrs
[
"
NX_class
"
]
=
"
NXentry
"
...
@@ -372,7 +374,13 @@ def integrate_ims_in_dir(path_im, path_int, dtype_im=".tif", dtype_int=".dat"):
...
@@ -372,7 +374,13 @@ def integrate_ims_in_dir(path_im, path_int, dtype_im=".tif", dtype_int=".dat"):
entry
[
"
last_plot
"
]
=
h5py
.
SoftLink
(
f
"
/
{
subdir_name
}
/
{
entry_name
}
/measurement
"
)
entry
[
"
last_plot
"
]
=
h5py
.
SoftLink
(
f
"
/
{
subdir_name
}
/
{
entry_name
}
/measurement
"
)
except
Exception
as
e
:
except
Exception
as
e
:
print
(
f
"
Error processing file
{
result
[
'
filename
'
]
}
:
{
e
}
"
)
print
(
f
"
Error processing file
{
result
[
'
filename
'
]
}
in entry
{
entry_name
}
:
{
e
}
"
)
# Delete incomplete group if something failed inside it
del
h5
[
entry_name
]
continue
except
Exception
as
outer_e
:
print
(
f
"
Failed to create entry group
{
entry_name
}
:
{
outer_e
}
"
)
continue
continue
...
...
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