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:
- scenario
str Name of the scenario to download. Either
'A1','A2','D1'or'R2'.- dataset_split
stror None Artificial dataset split. Analogous to
dataset_splitinget_sriracha(). One of'C1','C2','C3','C4', orNone(default).- path
strorpathlib.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_format
str Output format of the returned data. Either
'pyfar'(default),'hdf5', or'numpy'.
- scenario
- Returns:
- data
dictorpathlib.Path Returned data depends on
output_format:'pyfar':dictwith keys'impulse_response'(pyfar.Signal),'source_coordinates'(pyfar.Coordinates), and'receiver_coordinates'(pyfar.Coordinates)'hdf5':pathlib.Pathto the HDF5 file containing the data.'numpy':dictwith keys'impulse_response'(numpy.ndarray),'source_coordinates'(numpy.ndarray),'receiver_coordinates'(numpy.ndarray), and'sampling_rate'(float).
- data
- 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:
- scenario
str Name of the scenario to download. One of
'SR1','SRA1','SR1-D','SRA1-D','SR2','SRA2','SR2-D', or'SRA2-D'.- dataset_split
stror None Optional dataset split for full-plane scenarios. One of
'C1','C2','C3','C4', orNone(default). Dense scenarios (ending in-D)do not have splits.- path
strorpathlib.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_format
str Output format of the returned data. Either
'pyfar'(default),'hdf5', or'numpy'.
- scenario
- Returns:
- data
dictorpathlib.Path Returned data depends on
output_format:'pyfar':dictwith keys'impulse_response'(pyfar.Signal),'source_coordinates'(pyfar.Coordinates),'receiver_coordinates'(pyfar.Coordinates), and'hdf5':pathlib.Pathto the HDF5 file containing the data.'numpy':dictwith keys'impulse_response'(numpy.ndarray),'source_coordinates'(numpy.ndarray),'receiver_coordinates'(numpy.ndarray),'speed_of_sound'(numpy.ndarray),'temperature'(numpy.ndarray),'sampling_rate'(int), and optionally'humidity'(numpy.ndarray).
- data
- 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 topyfar.Signaland coordinate arrays topyfar.Coordinates. Optionally filters source positions and corresponding impulse responses to a analogous to thedataset_splitparameter inget_sriracha().- Parameters:
- file
pathlib.Pathorstr Path to the HDF5 file.
- dataset_split
stror None Filter source positions and impulse responses. Analogous to
dataset_splitinget_sriracha(). One of'C1','C2','C3','C4', orNone(default).
- file
- Returns:
- data
dict Dictionary with the following keys:
'impulse_response':pyfar.Signal— Impulse response data.'source_coordinates':pyfar.Coordinates— Corrected source positions.'receiver_coordinates':pyfar.Coordinates— Receiver positions.
- data
- irdl.ista.load_h5(file)#
Load raw arrays from an HDF5 file into a dictionary.
- Parameters:
- file
pathlib.Pathorstr Path to the HDF5 file.
- file
- Returns:
- data
dict 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.
- data
- 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()orsplit_data()to an HDF5 file following the same structure as the MIRACLE and SRIRACHA datasets.- Parameters:
- data
dict Dictionary of numpy arrays as returned by
load_h5()orsplit_data().- path
pathlib.Pathorstr Path to the HDF5 file to write.
- data
- Returns:
- path
pathlib.Path Path to the written HDF5 file.
- path
- 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_splitparameter inget_sriracha().