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.
- __init__(message)¶
- 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)¶
- static supported_parameters() list[str]¶
List all supported acoustic parameter names.
- Returns list[str]:
Names of available acoustic parameters.
- get(item, default=None)¶
Get an acoustic parameter value by name.
- Parameters:
item – Parameter name.
default – Default value if parameter not found.
- Returns:
Parameter value or default.
- plot()¶
Open an interactive widget to visualize acoustic parameters.
- 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_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_spatial_ir(source: SourceDto | str, receiver: ReceiverDto | str) SpatialIR¶
Receive a spatial impulse response object from the simulation for a specific source and receiver. If receiver type was mono, will raise an exception
- 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_source_result_metadata(source: SourceDto | str) dict¶
Get the source result metadata for a source
- 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
- Return AcousticParameters:
Acoustic parameters for the source and receiver and if device is true, the parameters for each microphone on the device are returned as a list of AcousticParameters
- plot()¶
Open an interactive widget to visualize simulation results.
- plot_acoustic_parameters()¶
Open an interactive widget to visualize acoustic parameters across multiple source-receiver pairs.
- 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.