hrtfpykit.hrtf¶
Description:¶
hrtfpykit.hrtf is the main HRTF/HRIR data layer in hrtfpykit. It relies on
hrtfpykit.sofa to open, access, modify, and save SOFA files,
then represents files declared with the
SimpleFreeFieldHRIR and SimpleFreeFieldHRTF conventions as
HRTF objects. Each HRTF
instance keeps its backing SOFA object available
through Sofa, so dimensions, variables,
attributes, and metadata can still be reached from the loaded HRTF object.
HRTF and HRIR data describe the same binaural filtering behavior in different
domains: HRIR in the time domain and HRTF in the frequency domain. This layer
keeps both representations available through coordinated
IR and TF views,
so workflows can move between impulse response operations, frequency domain
analysis, spatial selection, and file synchronization while preserving the
original source grid and metadata.
The HRTF object is also the shared acoustic object
used by other hrtfpykit layers. In workflows handled by
hrtfpykit.plots, the current HRTF state drives the
generated figures: plots read the active IR,
TF, and
Sources views, so visualizations follow the
file that was loaded, the source positions that were selected, the ear channels
in use, and any transforms already applied. In workflows handled by
hrtfpykit.datasets, concrete datasets load each subject
resource through hrtf before specs extract values. That makes
HRTF the object from which
HRTFSpec,
ITDSpec, ILDSpec, and
SHSpec obtain acoustic arrays, binaural cues, or
spherical-harmonic data.
With these tools, users can load compatible HRTF or HRIR SOFA files as
HRTF objects, inspect source positions, select
subsets of measurements, apply processing operations, compute perceptual or
spectral metrics, build spherical-harmonic representations, synchronize modified
HRTFs with their backing SOFA objects, and pass processed HRTFs into plotting and
dataset pipelines.