hrtfpykit.plots

Description:

hrtfpykit.plots is hrtfpykit’s visualization layer for HRTF and HRIR analysis. It turns HRTF objects, comparisons between HRTF objects, and spherical-harmonic reconstruction results into Matplotlib figures configured with hrtfpykit layouts, axes, labels, legends, and titles. Its role is to make the acoustic state of the library visible: source positions, ear channels, time samples, frequency bins, magnitude and amplitude responses, interaural cues, spectral differences, and spherical-harmonic errors.

This layer is closely tied to hrtfpykit.hrtf. Single-object plotting methods are accessed from loaded HRTF objects through HRTFPlots and are documented with the HRTF API. Those methods read the active IR, TF, and Sources views, which keeps plots aligned with the current HRTF state instead of a detached copy of the data.

Comparison plots extend that same idea to multiple HRTF objects. They resolve positions, ears, and frequency ranges against each object, then show magnitude, amplitude, ITD, ILD, and LSD relationships in a shared figure. The spherical-harmonic plotting functions connect sht workflows back to the original HRTF object by visualizing reconstructed spectra and reconstruction error.

With these tools, users can plot the state of one loaded HRTF object, compare several HRTFs, inspect source grids, review magnitude, amplitude, ITD, ILD, and LSD relationships, visualize spatial cue differences, and evaluate spherical-harmonic reconstructions with the same coordinate, domain, and plotting conventions used by the rest of hrtfpykit.

Content: