ista#

Impulse response datasets from the Department of Engineering Acoustics, TU Berlin.

  • MIRACLE: Microphone Array Impulse Response Dataset for Acoustic Learning.

  • SRIRACHA: Shoebox Room Impulse Response Archive with Varying Absorption.

irdl.ista.download_and_merge(scenario, path, pup)#

Download and merge four quadrant-split HDF5 files into one full-plane dataset.

Reverses the interleaving performed by split_data(), writing row-by-row to keep memory usage bounded.

Parameters:
scenariostr

Base scenario name, e.g. 'SR1'.

pathPath

Directory where HDF5 files are stored.

puppooch.Pooch

Pooch instance for downloading files.

Returns:
output_pathPath

Path to the merged HDF5 file.

irdl.ista.download_and_merge_vds(scenario, path, pup)#

Download splits and create a virtual HDF5 file mapping them into one full-plane dataset.

The resulting file contains no data — only HDF5 virtual-dataset mappings that point back into the split files. The split files must remain in place.

Parameters:
scenariostr

Base scenario name, e.g. 'SR1'.

pathPath

Directory where HDF5 files are stored.

puppooch.Pooch

Pooch instance for downloading files.

Returns:
output_pathPath

Path to the virtual HDF5 file.

irdl.ista.get_miracle(scenario: str = 'A1', dataset_split: str = None, path: str = PosixPath('/home/runner/.cache/irdl'), output_format: str = 'pyfar')#

Download and extract the MIRACLE database from DepositOnce.

DOI: 10.14279/depositonce-20837

Parameters:
scenariostr

Name of the scenario to download. Either 'A1', 'A2', 'D1' or 'R2'.

dataset_splitstr or None

Artificial dataset split. Analogous to dataset_split in get_sriracha(). One of 'C1', 'C2', 'C3', 'C4', or None (default).

pathstr or pathlib.Path

Path to the directory where the data should be stored. Will be overwritten, if the environment variable IRDL_DATA_DIR is set. Default is the user cache directory.

output_formatstr

Output format of the returned data. Either 'pyfar' (default), 'hdf5', or 'numpy'.

Returns:
datadict or pathlib.Path

Returned data depends on output_format:

irdl.ista.get_sriracha(scenario: str = 'SR1-D', dataset_split: str = None, path: str = PosixPath('/home/runner/.cache/irdl'), output_format: str = 'pyfar')#

Download and extract the SRIRACHA database from DepositOnce.

DOI: 10.14279/depositonce-23943

Parameters:
scenariostr

Name of the scenario to download. One of 'SR1', 'SRA1', 'SR1-D', 'SRA1-D', 'SR2', 'SRA2', 'SR2-D', or 'SRA2-D'.

dataset_splitstr or None

Optional dataset split for full-plane scenarios. One of 'C1', 'C2', 'C3', 'C4', or None (default). Dense scenarios (ending in -D)do not have splits.

pathstr or pathlib.Path

Path to the directory where the data should be stored. Will be overwritten, if the environment variable IRDL_DATA_DIR is set. Default is the user cache directory.

output_formatstr

Output format of the returned data. Either 'pyfar' (default), 'hdf5', or 'numpy'.

Returns:
datadict or pathlib.Path

Returned data depends on output_format:

irdl.ista.h5_to_pyfar(file, dataset_split=None)#

Load data from an HDF5 file and convert to pyfar objects.

Loads raw data via load_h5() and converts impulse responses to pyfar.Signal and coordinate arrays to pyfar.Coordinates. Optionally filters source positions and corresponding impulse responses to a analogous to the dataset_split parameter in get_sriracha().

Parameters:
filepathlib.Path or str

Path to the HDF5 file.

dataset_splitstr or None

Filter source positions and impulse responses. Analogous to dataset_split in get_sriracha(). One of 'C1', 'C2', 'C3', 'C4', or None (default).

Returns:
datadict

Dictionary with the following keys:

irdl.ista.load_h5(file)#

Load raw arrays from an HDF5 file into a dictionary.

Parameters:
filepathlib.Path or str

Path to the HDF5 file.

Returns:
datadict

Dictionary with the following keys:

  • 'impulse_response' : numpy.ndarray — Impulse response data.

  • 'receiver_coordinates' : numpy.ndarray — Receiver positions as cartesian coordinates.

  • 'source_coordinates' : numpy.ndarray — Corrected source positions as cartesian coordinates.

  • 'speed_of_sound' : numpy.ndarray — Speed of sound per source position in m/s.

  • 'temperature' : numpy.ndarray — Ambient temperature per source position in °C.

  • 'sampling_rate' : int — Sampling rate in Hz.

  • 'humidity' : numpy.ndarray (optional) — Ambient humidity per source position, if present in the file.

irdl.ista.save_h5(data, path)#

Save a data dictionary of numpy arrays to an HDF5 file.

Needed for saving artificially split data. Writes the contents of a data dictionary as returned by load_h5() or split_data() to an HDF5 file following the same structure as the MIRACLE and SRIRACHA datasets.

Parameters:
datadict

Dictionary of numpy arrays as returned by load_h5() or split_data().

pathpathlib.Path or str

Path to the HDF5 file to write.

Returns:
pathpathlib.Path

Path to the written HDF5 file.

irdl.ista.split_data(data, dataset_split)#

Filter a data dictionary to a subgroup of source positions.

Splits source positions and corresponding impulse responses into one of four dataset splits analogous to the dataset_split parameter in get_sriracha().

Parameters:
datadict

Dictionary of numpy arrays as returned by load_h5().

dataset_splitstr

Spatial quadrant to filter to. One of 'C1', 'C2', 'C3', or 'C4'.

Returns:
datadict

Input dictionary with 'source_coordinates', and 'impulse_response' filtered to the requested dataset split.