Skip to content
Snippets Groups Projects
Commit fd48effe authored by BLANCO-GARCIA's avatar BLANCO-GARCIA
Browse files

add hdf5 reading function

parent ed22af22
No related branches found
No related tags found
No related merge requests found
"""
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment