Skip to content
Snippets Groups Projects
Commit 160b4a1d authored by Jameson Graef Rollins's avatar Jameson Graef Rollins
Browse files

Update hdf5 value retrieval

swap out deprecated interface
parent 9740d733
No related branches found
No related tags found
No related merge requests found
Pipeline #101903 passed
import datetime
import h5py
import datetime
SCHEMA = 'GWINC noise budget'
......@@ -42,7 +42,7 @@ def _read_trace_recursive(element):
if isinstance(item, h5py.Group):
trace[name] = _read_trace_recursive(item)
else:
trace[name] = item.value, dict(item.attrs.items())
trace[name] = item[:], dict(item.attrs.items())
return trace
......@@ -54,7 +54,7 @@ def load_hdf5(path):
"""
with h5py.File(path, 'r') as f:
# FIXME: check SCHEMA name/version
freq = f['Freq'].value
freq = f['Freq'][:]
traces = _read_trace_recursive(f['/traces'])
attrs = dict(f.attrs.items())
return freq, traces, attrs
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