plot_absolute_ild¶
- hrtfpykit.plots.plot_absolute_ild(hrtf, plane_angle=0.0, show=True, show_titles=True, show_labels=True, show_legends=True)¶
Plot absolute broad band ILD over a horizontal plane in polar form.
plot_absolute_ildcallsild()asild(hrtf, mode="broad-band", epsilon=1e-12, absolute=True)using the currenthrtf.IRdata. It selects the nearest measured horizontal plane fromhrtf.Sourcesand 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 ILD magnitude in dB.
- 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 broad band ILD polar curve.
- Return type:
matplotlib.figure.Figure
- Raises:
ValueError – If IR data 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 ILD dB units and radial ticks are formatted as integer decibel values.
Examples
Plot the unsigned broad band ILD cue around the horizontal plane:
>>> from hrtfpykit.hrtf import load_hrtf >>> from hrtfpykit.plots import plot_absolute_ild >>> hrtf = load_hrtf("P0001_FreeFieldComp_44kHz.sofa") >>> plot_absolute_ild(hrtf, plane_angle=0.0)