DrMarc / slab

python classes for working with sounds and conducting psychoacoustic experiments
MIT License
22 stars 7 forks source link

[BUG in HRTF interpolate] #70

Open Kazusa-z opened 10 months ago

Kazusa-z commented 10 months ago

Describe the bug Hi, I'm getting an error when trying to barycentric interpolation for HRTF files in .sofa format.

To Reproduce

import slab

ari_obj = slab.HRTF('data/CIPIC/subject_003.sofa') i_hrtf = ari_obj.interpolate(azimuth=0, elevation=0, method='barycentric')

Actual behaviour The output of the minimal code example. For instance, in the example above:

ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (201,) + inhomogeneous part.

OS and Version:

DrMarc commented 10 months ago

Thanks for reporting this! I will look into it this week. My first impression is that this is due to differences in how the hrtf filters are organized in different sofa files. I remember coming across this issue in a different context with one of the hrtf databases.