MCPcopy Create free account
hub / github.com/NSLS2/PyXRF / load_data_from_hdf5

Function load_data_from_hdf5

pyxrf/model/fileio.py:1030–1042  ·  view source on GitHub ↗
(working_directory, file_name, load_each_channel=True)

Source from the content-addressed store, hash-verified

1028
1029
1030def load_data_from_hdf5(working_directory, file_name, load_each_channel=True):
1031 get_data_nsls2 = True # Only 'APS' format is currently used
1032 try:
1033 if get_data_nsls2 is True:
1034 return read_hdf_APS(working_directory, file_name, load_each_channel=load_each_channel)
1035 else:
1036 return read_MAPS(working_directory, file_name, channel_num=1)
1037 except IOError as e:
1038 logger.error("I/O error({0}): {1}".format(e.errno, str(e)))
1039 logger.error("Please select .h5 file")
1040 except Exception:
1041 logger.error("Unexpected error:", sys.exc_info()[0])
1042 raise
1043
1044
1045def read_data_from_hdf5(fpath, *, representation="numpy_array", load_each_channel=True):

Callers 2

load_data_from_fileMethod · 0.85
read_data_from_hdf5Function · 0.85

Calls 2

read_hdf_APSFunction · 0.85
read_MAPSFunction · 0.85

Tested by

no test coverage detected