sofacoustics / SOFAtoolbox

SOFA Toolbox (API for Matlab, Octave)
http://sofaconventions.org
European Union Public License 1.2
116 stars 31 forks source link

SOFAhrtf2dtf failing on HUTUBS data #20

Closed jacobriiser closed 3 years ago

jacobriiser commented 4 years ago

Attempting to apply the function SOFAhrtf2dtf to data read from teh HUTUBS HRTF da fails, as the database apparently does not have does not have a field called "GLOBAL_Comment". This may be solved by changing lie 137 from: dtf.GLOBAL_Comment = [dtf.GLOBAL_Comment '. Directional transfer functions (DTFs) were generated by removing from the HRTFs the direction-independent log-amplitude spectrum for each ear.']; to: if isfield(dtf, 'GLOBAL_Comment') dtf.GLOBAL_Comment = [dtf.GLOBAL_Comment '. Directional transfer functions (DTFs) were generated by removing from the HRTFs the direction-independent log-amplitude spectrum for each ear.']; else dtf.GLOBAL_Comment = 'Directional transfer functions (DTFs) were generated by removing from the HRTFs the direction-independent log-amplitude spectrum for each ear.'; end

petibub commented 3 years ago

Dear Jacobriiser, thanks for the pointer - it's fixed now (see the latest revision). Regards, Piotr