Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unsupported format error (10001) with Python & h5netcdf created sofa file #46

Open
vanne02135 opened this issue Feb 16, 2018 · 14 comments

Comments

@vanne02135
Copy link

I wonder what's wrong with my HRTF that was created with h5netcdf, as it loads in all ambisonics daw plugins I tested but not with libmysofa? The sofa in question is https://drive.google.com/file/d/1SIslF4sgsI8lAl3Vm3S_QAdwtmfbbqnS/view?usp=sharing

Any ideas?

@hoene
Copy link
Owner

hoene commented Feb 17, 2018

You can compile libmysofa with the VDEBUG flag to get more information about the kind and location of the error.

@vanne02135
Copy link
Author

It seems that the superblock version is 0 in my sofa and reader expects version 2 or 3.

After correcting for that (using h5py and libver="latest"), I get a bit further:

libmysofa/src/hdf/dataobject.c:874: 00000030 OHDR
libmysofa/src/hdf/dataobject.c:772: OHDR message type 10 offset 4B len 2
libmysofa/src/hdf/dataobject.c:772: OHDR message type 2 offset 51 len 12
libmysofa/src/hdf/dataobject.c:772: OHDR message type 21 offset 67 len 12
libmysofa/src/hdf/dataobject.c:772: OHDR message type 0 offset 7D len 42
libmysofa/src/hdf/fractalhead.c:344: 00993289 FRHP
libmysofa/src/hdf/fractalhead.c:238: 0099336D FHIB
libmysofa/src/hdf/fractalhead.c:279: >> 4 999A44 5
libmysofa/src/hdf/fractalhead.c:39: 00999A44 FHDB
libmysofa/src/hdf/fractalhead.c:63: 5 0 1
libmysofa/src/hdf/fractalhead.c:87: 3 0 18 999A5E
libmysofa/src/hdf/fractalhead.c:108: FHDB type 3 unsupported values
libmysofa/src/hdf/fractalhead.c:344: 00991F38 FRHP
libmysofa/src/hdf/fractalhead.c:39: 00998844 FHDB
libmysofa/src/hdf/fractalhead.c:63: 4 0 1
libmysofa/src/hdf/fractalhead.c:87: 1 0 17153 99885D
libmysofa/src/hdf/fractalhead.c:160: FHDB type 1 unsupported values
Error reading file antti_2k17_latest.sofa. Error code: 10001

Any further tips?

@hoene
Copy link
Owner

hoene commented Feb 17, 2018

As the code says: /* TODO: for the following part, the specification is incomplete */
The specification is given in https://support.hdfgroup.org/HDF5/doc/H5.format.html

Now, the following steps are required:

  1. We need a license for your sofa file (e.g. creative common or BSD) to add the to the libmysofa test files.
  2. We need to reverse engineer the common hdf5 implementation
  3. Then, libmysofa can be updated accordingly.

@vanne02135
Copy link
Author

Sounds great. You can use the sofa file under Creative Commons Attribution + Non-commercial (BY-NC). Would you prefer the one linked above, the libver='latest' converted (as in version bounding) or both?

@hoene
Copy link
Owner

hoene commented Feb 17, 2018

the latest is fine...

@simonschwaer
Copy link
Contributor

simonschwaer commented Mar 7, 2018

+1 on this, using h5py 2.7.1 with libver='latest'. Actually, the MATLAB API cannot read this file too, so the problem might be on the creation side?

I also tried to create a SOFA file from Python with netCDF4-python 1.3.2 (compiled against libnetcdf 4.4.0-2 on Ubuntu 16.04). This file works fine in MATLAB, but libmysofa complains about the superblock version (as vanne02135 reported above with h5netcdf).

@hoene
Copy link
Owner

hoene commented Jan 25, 2020

@hoene
Copy link
Owner

hoene commented Jan 28, 2020

not relevant anymore

@hoene hoene closed this as completed Jan 28, 2020
@mike-meta
Copy link

mike-meta commented Jun 26, 2024

@hoene Hi, I'm trying to read a SOFA file created by using h5py and using the latest release version of libmysofa as 1.3.2, but it gives me this error here:

libmysofa\src\hdf\dataobject.c:1204: 00000030 OHDR
libmysofa\src\hdf\dataobject.c:1095:  OHDR message type  2 offset     4C len   12
libmysofa\src\hdf\dataobject.c:1095:  OHDR message type 10 offset     62 len    2
libmysofa\src\hdf\dataobject.c:1095:  OHDR message type 21 offset     68 len   12
libmysofa\src\hdf\dataobject.c:1095:  OHDR message type  0 offset     7E len  189
libmysofa\src\hdf\fractalhead.c:546: 20B FRHP
libmysofa\src\hdf\fractalhead.c:433: 00003465 FHIB
libmysofa\src\hdf\fractalhead.c:480: >> 4 68DE0E1 5
libmysofa\src\hdf\fractalhead.c:51: 068DE0E1 FHDB stack 1
libmysofa\src\hdf\fractalhead.c:75:  5 0 1
libmysofa\src\hdf\fractalhead.c:117:  3    0 C 068DE0F7
libmysofa\src\hdf\fractalhead.c:139: FHDB type 3 unsupported valuesFile: 
SOFA decode error: 10001
Failed to read SOFA format.

We thought this issue might be related to endianness of the SOFA file created by h5py but it gives the same error if I use little or big endianness, which seems has nothing to do with this issue. Any hint how to resolve this issue?

@umlaeute
Copy link
Collaborator

please provide an example file (preferably small), or (easy to run) code to generate one.

@mike-meta
Copy link

please provide an example file (preferably small), or (easy to run) code to generate one.

Hi @umlaeute, thanks for responding. Here is a small test file that fails on my end attached here: https://drive.google.com/file/d/1aJqohf07TefRk2XKmgiR-FbwXjmL89zs/view?usp=sharing. It could be used by you for testing purposes under Creative Commons Attribution + Non-commercial (BY-NC) license. Please let me know there is something I can do to help.

@umlaeute
Copy link
Collaborator

thanks.
i'm attaching the file here (so as long as the issue tracker works it should be available)

test_h5py.sofa.zip (CC-BY-NC-4.0)

@hoene hoene reopened this Jun 29, 2024
@mike-meta
Copy link

@umlaeute Hi, I appreciate your help if you let me know if there is any update on this issue. Thanks!

@hoene
Copy link
Owner

hoene commented Jul 16, 2024

I had a look on it. It is a bit more complicated as the HDF5 spec is not well documented here - or at least I did not found it. @gheber might help me which the information on how to implement the reader.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants