Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
P
pyatsoleiloutils
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
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
PA
Optics
pyatsoleiloutils
Commits
fd48effe
Commit
fd48effe
authored
1 year ago
by
BLANCO-GARCIA
Browse files
Options
Downloads
Patches
Plain Diff
add hdf5 reading function
parent
ed22af22
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
pyatsoleiloutils/readhdf5file.py
+34
-0
34 additions, 0 deletions
pyatsoleiloutils/readhdf5file.py
with
34 additions
and
0 deletions
pyatsoleiloutils/readhdf5file.py
0 → 100644
+
34
−
0
View file @
fd48effe
"""
This file contains functions to read preformated data from
hdf5 files
"""
import
h5py
import
numpy
__all__
=
[
'
readmomaphdf5
'
]
def
readmomaphdf5
(
fname
):
"""
This functions reads a given hdf5 with momentum aperture data
saved with the function savemomaphdf5.
Args:
fname: name of the input hdf5 file
Returns:
"""
f
=
h5py
.
File
(
'
momap_
'
+
listofringnames
[
i
]
+
'
.hdf5
'
,
'
r
'
)
# set momap input format for get_lifetime
momap_pn
=
numpy
.
array
((
f
[
'
momap
'
][
'
dppP
'
][:],
f
[
'
momap
'
][
'
dppN
'
][:]))
momap_pn
=
numpy
.
copy
(
momap_pn
.
T
)
s_indexes
=
f
[
'
momap
'
][
'
s_indexes
'
][:]
s_array
=
f
[
'
momap
'
][
'
s_array
'
][:]
f
.
close
()
return
momap_pn
,
s_indexes
,
s_array
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