Commit 194b0b5c authored by Carsten Richter's avatar Carsten Richter
Browse files

h5py: replace `.value` by `[()]` to avoid warning

parent c410bbb8
......@@ -20,20 +20,20 @@ def get_scan_parameters(masterH5):
motors = []
for i in range(2):
key = "motor_%i"%i
m = ScanRange(scanpar[key].value,
scanpar["%s_start"%key].value,
scanpar["%s_end"%key].value,
scanpar["%s_steps"%key].value
m = ScanRange(scanpar[key][()],
scanpar["%s_start"%key][()],
scanpar["%s_end"%key][()],
scanpar["%s_steps"%key][()]
)
motors.append(m)
Nentries = len(h5m)
det = someentry["instrument/detector"]
result = dict()
result["exposuretime"] = float(someentry["title"].value.split(" ")[-1])
result["exposuretime"] = float(someentry["title"][()].split(" ")[-1])
for key in det:
ds = det[key]
if not ds.shape:
result[key] = ds.value
result[key] = ds[()]
shape = (Nentries, motors[1].numpoints, motors[0].numpoints) #slow to fast
result["shape"] = shape
result["motor0"] = motors[0]
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment