A Tuesday 16 November 2010 15:12:16 Gerrit Holl escrigué: > Hi, > > I am moving from NetCDF to HDF5. In NetCDF, I can assign attributes > to each variable/column. That is very useful for self-documenting > the file like this: > > double AVHRR_LONG(Collocations) ; > AVHRR_LONG:long_name = "AVHRR Longitude" ; > AVHRR_LONG:units = "degrees_east" ; > AVHRR_LONG:valid_range = -180., 180. ; > > I know that in HDF5, I can assign attributes to each node. But I > think the columns of a table are not nodes. Is there an equivalent > in HDF5 to NetCDF's variable attributes? How would I use this in > pytables?
Hmm, I'm not sure (a NetCDF expert may want to chime in here), but I think that the variable/columns you are referring to in NetCDF are actually the equivalents of leaves in PyTables (datasets in HDF5). Having said this, I'm afraid that there is no way to attach an HDF5 attribute to columns in Table objects (other than using a convention for attaching attrs to the table in the form: 'column_XXX_myattr', where XXX is the column name). -- Francesc Alted ------------------------------------------------------------------------------ Beautiful is writing same markup. Internet Explorer 9 supports standards for HTML5, CSS3, SVG 1.1, ECMAScript5, and DOM L2 & L3. Spend less time writing and rewriting code and more time creating great experiences on the web. Be a part of the beta today http://p.sf.net/sfu/msIE9-sfdev2dev _______________________________________________ Pytables-users mailing list Pytables-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/pytables-users