From: travlr <vel...@gm...> - 2005-02-27 08:24:39
|
Hi Francesc, The reference for walkGroups() says: Iterator that returns the list of Groups (not Leaves) hanging from where. From this description, the list returned should not include the "/" group if that is what is labled for where. -->walkGroups(where="/") The tutorial provides great & diverse examples of how to attain the public attributes of the object tree, but does not express how into instantiate the leaves, via iteration, so they can be used for numeric processing. For instance I'm trying to loop through the groups hanging from "root", to work with the arrays contained within. One version I've tried: import tables as ta f = ta.openFile('/H5/ESdat.h5','r') for group in f.walkGroups(where="/"): g = eval("f.root."+group._v_name) ap = g.AP.read() aS = g.AS.read() p1 = g.P1.read() v1 = g.V1.read() a1 = g.A1.read() ud = g.UD.read() ... do some things... f.close() I've tried many possible ways to iterate through the file and auto-magically perform tasks. Thank you, Kevin |