hrtfpykit.sofa

Description:

hrtfpykit.sofa is hrtfpykit’s direct interface for .sofa files. SOFA (Spatially Oriented Format for Acoustics) files organize spatial-acoustic measurements together with declared conventions, named dimensions, data variables, global attributes, variable attributes, source positions, receiver information, and other metadata needed to interpret the file correctly.

The SOFA class is the abstraction used to inspect, validate, edit, clone, copy, summarize, and save those files. It gives direct access to dimensions, global attributes, variables, and variable attributes without making users work against a raw netCDF4 object. This layer is not limited to SimpleFreeFieldHRIR and SimpleFreeFieldHRTF files; it works with the stable SOFA conventions registered in hrtfpykit, following the stable convention families listed by the SOFA project.

The hrtfpykit.hrtf layer relies on hrtfpykit.sofa when it loads SimpleFreeFieldHRIR and SimpleFreeFieldHRTF files. A loaded HRTF object keeps its backing SOFA object available through Sofa, so HRTF workflows can still reach the original file dimensions, variables, attributes, and convention metadata.

With these tools, users can open .sofa files as SOFA objects, inspect convention metadata, run convention and safety checks, edit dimensions, variables, or attributes, create clones or copies, and save modified files.

Content: