blob: f65da9e4ada5929544357550921a4f3f17d1dd74 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/usr/bin/env python
import h5py
import sys
import matplotlib.pyplot as plt
if len(sys.argv) != 3:
print("Syntax: {} file.h5 /data/location\n".format(sys.argv[0]))
sys.exit(1)
fh = h5py.File(sys.argv[1], 'r')
dataset = fh[sys.argv[2]]
show = plt.figure()
plt.imshow(dataset)
plt.title("{} {}".format(sys.argv[1], sys.argv[2]))
plt.show()
fh.close()
|