treble_tsdk.results.results
Results management and acoustic parameter analysis.
Provides classes for loading, analyzing and visualizing simulation results including acoustic parameters, impulse responses, and result metadata.
Functions
|
Create a Results object for accessing simulation results. |
Classes
Container for acoustic parameter measurements. |
|
Simulation results accessor with methods for retrieving impulse responses and acoustic parameters. |
Exceptions
Exception raised for errors in results processing. |
- exception treble_tsdk.results.results.SDKResultsException
Exception raised for errors in results processing.
Used to indicate issues with result file access, parsing, or data retrieval.
- class treble_tsdk.results.results.AcousticParameters
Container for acoustic parameter measurements.
Stores frequency-dependent acoustic metrics including reverberation times, clarity, and SPL values.
- __init__(edt: list[float] | None = None, t20: list[float] | None = None, t30: list[float] | None = None, c50: list[float] | None = None, c80: list[float] | None = None, d50: list[float] | None = None, ts: list[float] | None = None, g: list[float] | None = None, spl: list[float] | None = None, spl_a: list[float] | None = None, spl_c: list[float] | None = None, spl_z: list[float] | None = None, sti: list[float] | None = None, sti_using_spl: list[float] | None = None, mtf: list[float] | None = None, center_bands: list[float] | None = None, l_j: list[float] | None = None, l_j_avg: list[float] | None = None, j_lf: list[float] | None = None, **kwargs)
- class treble_tsdk.results.results.Results
Simulation results accessor with methods for retrieving impulse responses and acoustic parameters.
Provides lazy-loading access to simulation results including mono IRs, spatial IRs, and acoustic metrics.
- __init__(simulation: Simulation, data_reader: DataReaderBase, result_type: ResultType = None)
A class which is designed to contain the results of a simulation.
- Parameters:
simulation (Simulation) – The relevant simulation object
data_reader (DataReaderBase) – The data reader to read the results from
result_type (ResultType | None) – The type of results to be used, defaults to the simulation type
- get_acoustic_parameters(source: SourceDto | str, receiver: ReceiverDto | str) AcousticParameters
Get acoustic result parameters for a particular source and receiver, if receiver is not given
- Parameters:
source (SourceDto) – A source associated with the simulation
receiver (ReceiverDto | None) – A receiver associated with the simulation and source, defaults to None
- Returns:
Acoustic parameters for the source and receiver. If device is true, the parameters for each microphone on the device are returned as a list of AcousticParameters.
- get_device_ir(source: SourceDto | str, receiver: ReceiverDto | str) DeviceIR
Receive a device rendered impulse response object from the simulation for a specific source and receiver. If receiver is not a device type, an exception will be raised.
- Parameters:
source (SourceDto) – A source associated with the simulation
receiver (ReceiverDto) – A receiver associated with the simulation and source
- Return DeviceIR:
A device IR object corresponding to the input specifications
- get_mono_ir(source: SourceDto | str, receiver: ReceiverDto | str) MonoIR
Receive a mono impulse response object from the simulation for a specific source and receiver
- Parameters:
source (SourceDto) – A source associated with the simulation
receiver (ReceiverDto) – A receiver associated with the simulation and source
- Return MonoIR:
A MonoIR object corresponding to the input specifications
- get_moving_ir(source: SourceDto | str, receiver: ReceiverDto | str) MovingIR
Receive a moving impulse response object from the simulation for a specific source and receiver.
- get_source_result_metadata(source: SourceDto | str) dict
Get the source result metadata for a source
- treble_tsdk.results.results.get_results_object(simulation: Simulation, results_directory: Path | str, result_type: ResultType = None) Results | 'FreeFieldResults' | None
Create a Results object for accessing simulation results.
- Parameters:
simulation (Simulation) – Simulation object to load results for.
results_directory (Path | str) – Local directory path or None for S3 lazy loading.
result_type (ResultType) – Type of results to load, defaults to simulation type.
- Returns Results | FreeFieldResults | None:
Results accessor object.