Does anyone know how I could define a floating point data type to
A 32-bit float in IBM system/360 format? I would like to be able to
HDF file with the actual data being contained in an external SEG-Y file
format used for storing seismic data). This would hopefully allow me to
nice interface to existing SEG-Y files. Unfortunately the floating-point
Contained in this type of file is usually in IBM-32 bit format.
I have had a look at the HDF documentation and my first attempt looked
IBM_type = H5Tcopy(H5T_IEEE_F32BE);
H5Tset_fields(IBM_type, 31, 24, 7, 0, 24);
This sets the mantissa, exponent bit sizes/positions etc.
Of course, this doesn't work correctly because the IBM floating point
format uses base 16 rather than base 2 for the exponent power ie.
Float = sign * mantissa * 16^exponent rather than the usual
Float = sign * mantissa * 2^exponent
Anybody have an idea of how this could be achieved using HDF?