test-data.h5 (18.1 KB)
In the attached file I’ve added a single row of data of a compound type as an attribute and as a data-set.
HDFView can display the data-set but when I double click the attribute I get “Error occured when instantiating TableView class.”
gheber
April 12, 2022, 12:01pm
2
Could be an HDFView bug. The h5dump
output is shown below. What happened to that dataset /MeasurementConfigurations
? How did you create this file?
HDF5 "Downloads/test-data.h5" {
GROUP "/" {
GROUP "Measurement:12019" {
ATTRIBUTE "MeasurementConfiguration" {
DATATYPE H5T_COMPOUND {
H5T_STD_I64LE "Id";
H5T_IEEE_F64LE "Timestamp";
H5T_STRING {
STRSIZE 50;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
} "Name";
H5T_STRING {
STRSIZE 255;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
} "Description";
H5T_STRING {
STRSIZE 255;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
} "ModuleName";
H5T_STRING {
STRSIZE 255;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
} "ScannerName";
H5T_STRING {
STRSIZE 8000;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
} "ScannerConfiguration";
H5T_STRING {
STRSIZE 32;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
} "SessionKey";
}
DATASPACE SIMPLE { ( 1 ) / ( H5S_UNLIMITED ) }
DATA {
(0): {
4075,
44460.5,
"Measurement name",
"Measurement description",
"WiperBladeModule",
"WiperBladeScanner",
"{
"__class__": "tvlsystem.acquisition_params.WiperBladeAcquisitionParams",
"ave_tol_neg": 0.0,
"ave_tol_pos": 0.0,
"coav_interval": 2.0,
"coaverages": 1,
"max_tol_neg": 0.0,
"max_tol_pos": 0.0,
"min_tol_neg": 0.0,
"min_tol_pos": 0.0,
"optical_delay_extent": 35.0,
"optical_delay_offset": 0.0,
"oversample": 1,
"prepulse_extent": 10.0,
"reference_coaves": 100,
"rsdl_amplitude": 45.0,
"split_directions": false,
"track_peak": false,
"waveform_rate": 15.0
}",
"5ddbe25795ad48118f105d0442ef7bfc"
}
}
}
DATASET "MeasurementConfigurations" {
DATATYPE H5T_COMPOUND {
H5T_STD_I64LE "Id";
H5T_IEEE_F64LE "Timestamp";
H5T_STRING {
STRSIZE 50;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
} "Name";
H5T_STRING {
STRSIZE 255;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
} "Description";
H5T_STRING {
STRSIZE 255;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
} "ModuleName";
H5T_STRING {
STRSIZE 255;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
} "ScannerName";
H5T_STRING {
STRSIZE 8000;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
} "ScannerConfiguration";
H5T_STRING {
STRSIZE 32;
STRPAD H5T_STR_NULLTERM;
CSET H5T_CSET_ASCII;
CTYPE H5T_C_S1;
} "SessionKey";
}
DATASPACE SIMPLE { ( 1 ) / ( H5S_UNLIMITED ) }
DATA {h5dump error: unable to print data
}
}
}
}
}
byrn
April 12, 2022, 12:31pm
3
What version is hdfview? We have fixed a number of issues since the release of hdfview 3.1.1
Current development (soon to be released) does display correctly.
Allen
What do you mean ‘what happened to …’? If you mean why is it only one row, then it’s just a test.
My code here: https://github.com/PhilPJL/HDF5Test
It’s version 3.1.3 - annoyingly this post has to be > 20 characters
gheber
April 12, 2022, 12:46pm
6
The attribute value seems sensible, but the dataset value looks uninitialized(?).
byrn
April 12, 2022, 1:17pm
8
We do have binaries of the latest hdfview development for some platforms we could make available.
On my system, fedora 35, i have development builds of both hdf5 and hdfview that display this file correctly.
HDF5 1.12.2 will be released within a couple of weeks and HDFView 3.2.0 (based on hdf5 1.12.2) should be released shortly after that.
ok great - no hurry. My client wants attributes as simple types for now anyway.