Hi Luis, A Dimecres 06 Setembre 2006 19:08, Luis Armendariz va escriure: > How safe is it to write HDF5 files directly with the HDF5 C API > and have those files be compatible with PyTables? I ask because > I took a look at the structure of the files generated by the > tables module and all that seems to be required are a few attributes > on each HDF5 object, as documented in the manual. Is there a C API > you could expose for this purpose, or are those documented attributes > enough?
Well, the High Level API from HDF5 generates some of the attributes of PyTables (in fact, PyTables started using this HL API for Table objects, but then I've started to change things on it and now this is not used anymore). So, this is a good start for you. Then, you only have to add as many attributes as you need (following the Appendix D in Users' Guide). > I guess the only thing I feel wary about is the pickle object that > gets stored in the FILTERS attribute. What I did was create a file > in PyTables, stole the pickle from that file and reused it in my > own C code. It wasn't clear to me from the manual if this attribute > was optional, so I just left it alone. > > Would it be possible to use a shorthand string in place of > the current pickle to represent the value of the FILTERS > attribute? (Same goes for any related attributes). I mean, > much like FLAVOR allows for 'Numeric', 'numarray' and 'numpy'. > > Parallel HDF5 doesn't support writing to a compressed dataset > anyway, so actually I just need a sensible default, even if the > pickle remains there for the other cases. Of course, if the > attribute is optional, then never mind :-) Well, not only the FILTERS attribute is optional, but it is private as well (it is only that we haven't decided yet a way to declare attributes as private), and this is why it is not documented. PyTables always prioritizes the *actual* metainformation about filters that provides HDF5 over that in FILTERS attribute, so you can (you *should*) avoid its use without any problem. The only reason why this is kept in PyTables is for adding information about filters in nodes that doesn't support them natively in HDF5 (e.g. groups). PyTables uses this information in order to propagate it to leaves behind groups. However, it FILTERS doesn't exist, none filter is assumed (for groups, leaves will read actual HDF5 filters) to be propagated and that's all. Saludos, -- >0,0< Francesc Altet http://www.carabos.com/ V V Cárabos Coop. V. Enjoy Data "-" ------------------------------------------------------------------------- Using Tomcat but need to do more? Need to support web services, security? Get stuff done quickly with pre-integrated technology to make your job easier Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642 _______________________________________________ Pytables-users mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/pytables-users
