diff options
author | Anthony LaTorre <telatorre@gmail.com> | 2011-08-17 14:40:25 -0400 |
---|---|---|
committer | Anthony LaTorre <telatorre@gmail.com> | 2011-08-17 14:40:25 -0400 |
commit | f8a87ff1069d7fab7031804da2d66773be8695a6 (patch) | |
tree | bc9807263b3f57f48c1fb2ce28c4bb0920e8a423 /draw.py | |
parent | 9cb86aba279caf86769448df877a727f54ebb786 (diff) | |
download | lecrunch-f8a87ff1069d7fab7031804da2d66773be8695a6.tar.gz lecrunch-f8a87ff1069d7fab7031804da2d66773be8695a6.tar.bz2 lecrunch-f8a87ff1069d7fab7031804da2d66773be8695a6.zip |
documentation update and open hdf5 files in read only mode in draw.py
Diffstat (limited to 'draw.py')
-rwxr-xr-x | draw.py | 4 |
1 files changed, 3 insertions, 1 deletions
@@ -17,7 +17,7 @@ def roundrobin(*iterables): nexts = cycle(islice(nexts, pending)) def draw(filename, nevents): - f = h5py.File(filename) + f = h5py.File(filename, 'r') fig = plt.figure() for i, dataset in enumerate((f[name] for name in f)): @@ -37,6 +37,8 @@ def draw(filename, nevents): plt.ylabel('Voltage (V)') plt.title(dataset.name) + f.close() + return fig if __name__ == '__main__': |