This [1] seems to indicate that this kind of thing should be supported via
numpy structured arrays. However, I bet that this data set did not start
out as a numpy structured array. This might explain the problem if the
flavor is wrong. I would think that a fix should be relatively easy.
Be Well
Anthony
1.
http://pytables.github.com/usersguide/libref/declarative_classes.html?highlight=attr#the-attributeset-class
On Tue, Nov 27, 2012 at 5:17 PM, dashesy <dash...@gmail.com> wrote:
> I have a file that has attributes with nested compound type, when
> reading it with PyTables 2.4.0 I get this error:
>
> C:\Python27\lib\site-packages\tables\attributeset.py:293:
> DataTypeWarning: Unsupported type for attribute 'BmiRoot' in node '/'.
> Offending HDF5 class: 6
> value = self._g_getAttr(self._v_node, name)
> C:\Python27\lib\site-packages\tables\attributeset.py:293:
> DataTypeWarning: Unsupported type for attribute 'BmiChanExt' in node
> 'channel00001'. Offending HDF5 class: 6
> value = self._g_getAttr(self._v_node, name)
>
> Hard to say what exactly happens, just wanted to know if this is not
> already fixed in newer versions I will be more than happy to work on
> it, any pointers as to where to look is appreciated.
>
> Here is the (partial) dump of the file (for brevity I deleted
> non-related data parts but can provide the full file if needed):
>
> HDF5 "pause5-10-5.ns2.h5" {
> GROUP "/" {
> ATTRIBUTE "BmiRoot" {
> DATATYPE "/BmiRootAttr_t"
> DATASPACE SIMPLE { ( 1 ) / ( 1 ) }
> DATA {
> (0): {
> 1,
> 0,
> 0,
> 1,
> "2008-12-02 22:57:02.251000",
> "1 kS/s",
> ""
> }
> }
> }
> DATATYPE "BmiRootAttr_t" H5T_COMPOUND {
> H5T_STD_U32LE "MajorVersion";
> H5T_STD_U32LE "MinorVersion";
> H5T_STD_U32LE "Flags";
> H5T_STD_U32LE "GroupCount";
> H5T_STRING {
> STRSIZE H5T_VARIABLE;
> STRPAD H5T_STR_NULLTERM;
> CSET H5T_CSET_ASCII;
> CTYPE H5T_C_S1;
> } "Date";
> H5T_STRING {
> STRSIZE H5T_VARIABLE;
> STRPAD H5T_STR_NULLTERM;
> CSET H5T_CSET_ASCII;
> CTYPE H5T_C_S1;
> } "Application";
> H5T_STRING {
> STRSIZE H5T_VARIABLE;
> STRPAD H5T_STR_NULLTERM;
> CSET H5T_CSET_ASCII;
> CTYPE H5T_C_S1;
> } "Comment";
> }
> GROUP "channel" {
> DATATYPE "BmiChanAttr_t" H5T_COMPOUND {
> H5T_STD_U16LE "ID";
> H5T_IEEE_F32LE "Clock";
> H5T_IEEE_F32LE "SampleRate";
> H5T_STD_U8LE "SampleBits";
> }
> DATATYPE "BmiChanExt2Attr_t" H5T_COMPOUND {
> H5T_STD_I32LE "DigitalMin";
> H5T_STD_I32LE "DigitalMax";
> H5T_STD_I32LE "AnalogMin";
> H5T_STD_I32LE "AnalogMax";
> H5T_STRING {
> STRSIZE 16;
> STRPAD H5T_STR_NULLTERM;
> CSET H5T_CSET_ASCII;
> CTYPE H5T_C_S1;
> } "AnalogUnit";
> }
> DATATYPE "BmiChanExtAttr_t" H5T_COMPOUND {
> H5T_IEEE_F64LE "NanoVoltsPerLSB";
> H5T_COMPOUND {
> H5T_STD_U32LE "HighPassFreq";
> H5T_STD_U32LE "HighPassOrder";
> H5T_STD_U16LE "HighPassType";
> H5T_STD_U32LE "LowPassFreq";
> H5T_STD_U32LE "LowPassOrder";
> H5T_STD_U16LE "LowPassType";
> } "Filter";
> H5T_STD_U8LE "PhysicalConnector";
> H5T_STD_U8LE "ConnectorPin";
> H5T_STRING {
> STRSIZE H5T_VARIABLE;
> STRPAD H5T_STR_NULLTERM;
> CSET H5T_CSET_ASCII;
> CTYPE H5T_C_S1;
> } "Label";
> }
> DATATYPE "BmiChanFiltAttr_t" H5T_COMPOUND {
> H5T_STD_U32LE "HighPassFreq";
> H5T_STD_U32LE "HighPassOrder";
> H5T_STD_U16LE "HighPassType";
> H5T_STD_U32LE "LowPassFreq";
> H5T_STD_U32LE "LowPassOrder";
> H5T_STD_U16LE "LowPassType";
> }
> GROUP "channel00001" {
> ATTRIBUTE "BmiChan" {
> DATATYPE "/channel/BmiChanAttr_t"
> DATASPACE SIMPLE { ( 1 ) / ( 1 ) }
> DATA {
> (0): {
> 1,
> 30000,
> 1000,
> 16
> }
> }
> }
> ATTRIBUTE "BmiChanExt" {
> DATATYPE "/channel/BmiChanExtAttr_t"
> DATASPACE SIMPLE { ( 1 ) / ( 1 ) }
> DATA {
> (0): {
> 1000,
> {
> 750000,
> 4,
> 1,
> 7500,
> 3,
> 1
> },
> 1,
> 1,
> "elec1"
> }
> }
> }
> ATTRIBUTE "BmiChanExt2" {
> DATATYPE "/channel/BmiChanExt2Attr_t"
> DATASPACE SIMPLE { ( 1 ) / ( 1 ) }
> DATA {
> (0): {
> -8191,
> 8191,
> -8191,
> 8191,
> "uV"
> }
> }
> }
> DATASET "continuous_set" {
> DATATYPE H5T_STD_I16LE
> DATASPACE SIMPLE { ( 631 ) / ( H5S_UNLIMITED ) }
> DATA {...
> }
> }
> }
> }
> }
> }
>
>
> ------------------------------------------------------------------------------
> Keep yourself connected to Go Parallel:
> DESIGN Expert tips on starting your parallel project right.
> http://goparallel.sourceforge.net
> _______________________________________________
> Pytables-users mailing list
> Pytables-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/pytables-users
>
------------------------------------------------------------------------------
Keep yourself connected to Go Parallel:
DESIGN Expert tips on starting your parallel project right.
http://goparallel.sourceforge.net
_______________________________________________
Pytables-users mailing list
Pytables-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/pytables-users