From: <le...@cn...> - 2012-05-02 01:25:27
|
I am just starting to work with python and pytables and have a question for the group. We have multiple HDF5 files, each of which contains 30 seconds of data from a longer sequence. Rather than merge the data, we'd like to be able to create a list (or array) of pytables objects and operate on them simultaneously. For instance we have three h5 data files, each of which can be opened with the openFile command. data_1=tables.openFile(fname_1) plt.plot(data_1.root.photon.channel001.elev[:]) If we define the following list: all_data=[data_1, data_2, data_3] the we can do the following : plt.plot(all_data[0].root.photon.channel001.elev[:]) What we'd like to do is plot the data from all three (or more generally, N) hdf5 files simultaneously: plt.plot(all_data[0].root.photon.channel001.elev[:]) but this doesn't work. Is there a syntax that will work for this ? M -- Michael Lefsky Center for Ecological Applications of Lidar College of Natural Resources Colorado State University http://www.researcherid.com/rid/A-7224-2009 If I were creating the world I wouldn't mess about with butterflies and daffodils. I would have started with lasers, eight o'clock, Day One! - Time Bandits |