FabianDataset#

class irdl.FabianDataset#

Bases: AKTZipBaseDataset

Download and extract the FABIAN HRTF database from DepositOnce.

Attributes:
namestr

Dataset name (“fabian”).

doistr

Digital Object Identifier (“10.14279/depositonce-5718.5”).

_category = 'head_related_impulse_responses'#
_source_filename(**dataset_kwargs) str#

Construct the ingest-ready (SOFA) filename.

Parameters:
**dataset_kwargsdict

Expected keys: kind, hato.

Returns:
str

File name in format “FABIAN_HRIR_{kind}_HATO_{hato}.sofa”.

_validate_params(**dataset_kwargs) None#

Validate FABIAN-specific parameters.

Parameters:
**dataset_kwargsdict

Parameters to validate. Expected keys: kind, hato.

Raises:
ValueError

If kind or hato is out of range.

_zipfile: str = 'FABIAN_HRTF_DATABASE_v4.zip'#
doi: str = '10.14279/depositonce-5718.5'#
classmethod get(kind: str = 'measured', hato: int = 0, cache_dir: str | Path | None = None, export_dir: str | Path | None = None, output_format: str = 'pyfar') dict | Path | None#

Download and extract the FABIAN HRTF database from DepositOnce.

DOI: https://doi.org/10.14279/depositonce-5718.5

Parameters:
cache_dirstr

Cache directory for downloads. Defaults is the OS user cache directory. This default can be overridden by setting IRDL_CACHE_DIR environment variable.

export_dirstr, optional

Directory for final output. If specified, the data will be exported to <export_dir/FABIAN/>. Else, it remains in <cache_dir/output/>.

output_formatstr

Output format: ‘pyfar’, ‘numpy’, ‘hdf5’, ‘sofa’, or ‘raw’.

kindstr, optional

Type of HRTF to download. Either ‘measured’ or ‘simulated’. Default is ‘measured’.

hatoint, optional

Head-above-torso-rotation of HRTFs in degrees. One of: 0, 10, 20, 30, 40, 50, 310, 320, 330, 340, 350. Default is 0.

Returns:
dict or Path

For ‘pyfar’ / ‘numpy’: dict of in-memory objects. For ‘sofa’ / ‘hdf5’ / ‘raw’: Path to file on disk.

name: str = 'fabian'#