Metadata-Version: 2.4
Name: irdl
Version: 1.0.0b2
Summary: Python package to download, unpack and process impulse response datasets.
Keywords: impulse response,downloader,head-related,room,acoustics,benchmark
Author: Art Pelling, Siavash Zaid
Author-email: Art Pelling <a.pelling@tu-berlin.de>, Siavash Zaid <siavash.zaid@campus.tu-berlin.de>
License-Expression: MIT
License-File: LICENSE
Classifier: Development Status :: 4 - Beta
Classifier: Intended Audience :: Education
Classifier: Intended Audience :: Science/Research
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Requires-Dist: h5py>=3.15.1
Requires-Dist: numpydoc>=1.10.0
Requires-Dist: pooch>=1.8.2
Requires-Dist: pyfar>=0.7.3
Requires-Dist: rich>=13.0.0
Requires-Dist: typer>=0.17.4
Requires-Dist: psutil>=7.0.0
Requires-Dist: sofar>=1.2.3
Requires-Python: >=3.11
Description-Content-Type: text/markdown

[![PyPI](https://img.shields.io/pypi/pyversions/irdl.svg)](https://pypi.org/project/irdl)
[![PyPI](https://img.shields.io/pypi/v/irdl.svg)](https://pypi.org/project/irdl)
[![DOI](https://zenodo.org/badge/DOI/10.5281/zenodo.19496801.svg)](https://zenodo.org/doi/10.5281/zenodo.19496801)

# `irdl`: Impulse Response Downloader
Python package to download, unpack and process impulse response datasets in a unified way.

## Highlights
- Returns data in a standardised format either
  - a dictionary of [`pyfar`](https://pyfar.org)-objects (default)
  - a dictionary of NumPy arrays
  - a path to an HDF5-file for partial data access not having to load the entire data into memory 
- Leverages [`pooch`](https://www.fatiando.org/pooch/latest/) to download impulse response datasets and verifies their integrity with a checksum. 
- Only downloads, extracts and processes what is actually needed.
- Adds `pooch`-support for dSpace repositories, such as TU Berlin [depositonce](https://depositonce.tu-berlin.de/home).
- Data storage location can be set by `IRDL_CACHE_DIR` environmental variable (defaults to user cache directory).

## Links
- [Documentation](https://artpelling.github.io/irdl/)
- [Installation instructions](https://artpelling.github.io/irdl/installation.html)
- [Available datasets](https://artpelling.github.io/irdl/datasets.html)
- [Adding a Dataset](https://artpelling.github.io/irdl/adding_dataset.html)
- [Reference (CLI & API)](https://artpelling.github.io/irdl/reference.html)
- [Changelog](https://github.com/artpelling/irdl/blob/main/CHANGELOG.md)

## Usage (Python API)

The package can be included in a Python script as simple as:

``` python
from irdl import FabianDataset

data = FabianDataset.get(kind='measured', hato=10)
print(data)
```

``` shell
{'impulse_response': time domain energy Signal:
(11950, 2) channels with 256 samples @ 44100.0 Hz sampling rate and none FFT normalization
,
 'receiver_coordinates': 2D Coordinates object with 2 points of cshape (2, 1)

Does not contain sampling weights,
 'source_coordinates': 1D Coordinates object with 11950 points of cshape (11950,)

Does not contain sampling weights}
```

## Usage (CLI)

Once installed, the package provides a convenient command line script which can be invoked with `irdl`.

``` shell
$ irdl --help
                                                                                                                        
 Usage: irdl [OPTIONS] COMMAND [ARGS]...                                                                                
                                                                                                                        
╭─ Options ────────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ --install-completion          Install completion for the current shell.                                              │
│ --show-completion             Show completion for the current shell, to copy it or customize the installation.       │
│ --help                        Show this message and exit.                                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
╭─ Commands ───────────────────────────────────────────────────────────────────────────────────────────────────────────╮
│ miracle   Download and extract the MIRACLE database from DepositOnce.                                                │
│ sriracha  Download and extract the SRIRACHA database from DepositOnce.                                               │
│ fabian    Download and extract the FABIAN HRTF Database from DepositOnce.                                            │
╰──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────╯
```
