SOFA in MakeMHR II: Non-singular poles on field distance 1.000000
ThreeDeeJay opened this issue · 2 comments
After #774 was fixed and I finally managed to set up GitHub Actions to compile the latest makemhr.exe, I decided to try the latest version of EAC which added an option to set a uniform layout/elevations (davircarvalho/Individualized_HRTF_Synthesis#7)
However, now I ran into a different issue when trying to convert the EAC SOFAs, even tried multiple resolutions (filename numbers are the EAC custom grid values):
Generating "EAC_Default_CustomGrid_-90_90_10_0_360_10_48kHz-48000.mhr"
Using 2 threads.
Reading HRTF data from EAC_Default_CustomGrid_-90_90_10_0_360_10_48kHz.sofa...
Unexpected delay attribute: _Netcdf4Coordinates = <null>
Unexpected IR attribute: _Netcdf4Coordinates = <null>
Detecting compatible layout...
Non-singular poles on field distance 1.000000.
Using 0 of 684 IRs.
Generating "EAC_Default_CustomGrid_-90_90_15_0_360_15_48kHz-48000.mhr"
Using 2 threads.
Reading HRTF data from EAC_Default_CustomGrid_-90_90_15_0_360_15_48kHz.sofa...
Unexpected delay attribute: _Netcdf4Coordinates = <null>
Unexpected IR attribute: _Netcdf4Coordinates = <null>
Detecting compatible layout...
Non-singular poles on field distance 1.000000.
Using 0 of 312 IRs.
Generating "EAC_Default_CustomGrid_-90_90_20_0_360_20_48kHz-48000.mhr"
Using 2 threads.
Reading HRTF data from EAC_Default_CustomGrid_-90_90_20_0_360_20_48kHz.sofa...
Unexpected delay attribute: _Netcdf4Coordinates = <null>
Unexpected IR attribute: _Netcdf4Coordinates = <null>
Detecting compatible layout...
Too many missing elevations on field distance 1.000000.
Using 0 of 162 IRs.
Generating "EAC_Default_CustomGrid_-90_90_30_0_360_30_48kHz-48000.mhr"
Using 2 threads.
Reading HRTF data from EAC_Default_CustomGrid_-90_90_30_0_360_30_48kHz.sofa...
Unexpected delay attribute: _Netcdf4Coordinates = <null>
Unexpected IR attribute: _Netcdf4Coordinates = <null>
Detecting compatible layout...
Non-singular poles on field distance 1.000000.
Using 0 of 84 IRs.
Generating "EAC_Default_CustomGrid_-90_90_5_0_360_5_48kHz-48000.mhr"
Using 2 threads.
Reading HRTF data from EAC_Default_CustomGrid_-90_90_5_0_360_5_48kHz.sofa...
Unexpected delay attribute: _Netcdf4Coordinates = <null>
Unexpected IR attribute: _Netcdf4Coordinates = <null>
Detecting compatible layout...
Non-singular poles on field distance 1.000000.
Using 0 of 2664 IRs.
I was able to convert a SOFA generated by Mesh2HRTF with those _Netcdf4Coordinates = <null>
warnings but it still succeeded:
Generating "Mesh2HRTF_HRIR_Default_48000-48000.mhr"
Using 2 threads.
Reading HRTF data from Mesh2HRTF_HRIR_Default_48000.sofa...
Unexpected sample rate attribute: _Netcdf4Coordinates = (null)
Unexpected delay attribute: _Netcdf4Coordinates = <null>
Unexpected IR attribute: _Netcdf4Coordinates = <null>
Detecting compatible layout...
Using 1850 of 1850 IRs.
Loading HRIRs... 1850 of 1850
Calculating HRIR onsets... 3700 of 3700
Calculating HRIR magnitudes... 3700 of 3700
Calculating diffuse-field average...
Performing diffuse-field equalization...
Synthesizing missing elevations...
Performing minimum phase reconstruction...
100% done (3700 of 3700)
Truncating minimum-phase HRIRs...
Normalizing final HRIRs...
Calculating impulse delays...
Creating MHR data set Output\HRIR_Default_48000\HRIR_Default_48000-48000.mhr...
Operation completed.
So the common denominator seems to be Non-singular poles on field distance 1.000000.
, except for EAC_Default_CustomGrid_-90_90_20_0_360_20_48kHz-48000.mhr (20 degree azimuths/elevations) where I got Too many missing elevations on field distance 1.000000.
instead.
Here's the script I used along with the latest makemhr and all the SOFAs shown above:
https://www.dropbox.com/s/8aihxjgb5f6kebt/makemhr_script%2BEAC%2BMesh2HRTF_SOFAs.7z?dl=1
The Non-singular poles on field distance ...
error means there's multiple azimuth responses on the +90 (or -90) degree elevation, which makes no sense to have since every azimuth at the +/-90 degree elevation is the same position. makemhr
has no idea what to do with them when there's more than one, as there should only be one.
The Too many missing elevations
error means the detected elevation step doesn't use any elevations below 0 degrees, which means makemhr
can't synthesize any missing lower elevations to fit that stepping value. I'll need to take a look at the SOFA to see why it may be doing that; the elevation step detection can misjudge things since it needs to find a stepping value that has responses on each elevation step, while also expecting lower elevations to not exist (which will be synthesized later as needed).
The _Netcdf4Coordinates = <null>
warnings are just saying it found an attribute it's unfamiliar with. As long as such an attribute is unrelated to interpreting the data, it's harmless.
I guess this seems more like an issue on EAC/libmysofa's end so I'll go ahead and close it, at least for now