plot_absolute_itd

hrtfpykit.plots.plot_absolute_itd(hrtf, plane_angle=0.0, show=True, show_titles=True, show_labels=True, show_legends=True)

Plot absolute ITD over a horizontal plane in polar form.

plot_absolute_itd calls itd() as itd(hrtf, method="threshold", output="time", thresh_level=-10.0, upper_cut_freq=3000.0, filter_order=10, absolute=True) using the current hrtf.IR data. It selects the nearest measured horizontal plane from hrtf.Sources and sorts the polar curve by azimuth.

The angular axis follows the SOFA spherical azimuth convention: front is 0 degrees, listener left is 90 degrees, back is 180 degrees, and listener right is 270 degrees. The radial axis shows ITD magnitude in microseconds.

Parameters:
  • plane_angle (float, default=0.0) – Target horizontal plane elevation used to select the horizontal plane. The nearest available elevation in the grid is used.

  • show (bool, default=True) – If True, display the figure before returning.

  • show_titles (bool, default=True) – If False, suppress generated default figure titles.

  • show_labels (bool, default=True) – If False, suppress generated axis labels and colorbar labels.

  • show_legends (bool, default=True) – If False, suppress generated legends.

  • hrtf (HRTF)

Returns:

Figure containing the absolute ITD polar curve.

Return type:

matplotlib.figure.Figure

Raises:

ValueError – If IR data or sample rate is missing, plane_angle is not finite, or the selected horizontal plane cannot be resolved for the current source grid.

Notes

The polar angular axis uses spherical azimuth in the SOFA convention. The radial label uses ITD time units and radial ticks use integer microsecond labels.

Examples

Plot the absolute ITD cue around the horizontal plane in polar form:

>>> from hrtfpykit.hrtf import load_hrtf
>>> from hrtfpykit.plots import plot_absolute_itd
>>> hrtf = load_hrtf("P0001_FreeFieldComp_44kHz.sofa")
>>> plot_absolute_itd(hrtf, plane_angle=0.0)