treble_tsdk.collections.ir_info
Functions
|
Compute the canonical unique id for an IR. |
Classes
Parameters describing how to render an IR through a device. |
|
IRInfo(source: 'Source', receiver: 'Receiver', simulation: 'Simulation', device: 'DeviceObj | None' = None, device_orientation: 'Rotation | None' = None, processing: 'ProcessingRecipe | None' = None, ir_processing_info: 'IRProcessingInfo | None' = None, dataframe_row: 'dict | None' = None) |
|
IRProcessingInfo(ir_id: 'str', task_id: 'str') |
|
ProcessingRecipe(filters: 'list[FilterDefinition]' = None, filter_structs: 'list[dict]' = None) |
- class treble_tsdk.collections.ir_info.DeviceRenderParams
Parameters describing how to render an IR through a device.
- Parameters:
device (DeviceObj) – The device to render the IR through.
device_orientation (Rotation) – The orientation of the device.
- device: DeviceObj
- class treble_tsdk.collections.ir_info.IRInfo
IRInfo(source: ‘Source’, receiver: ‘Receiver’, simulation: ‘Simulation’, device: ‘DeviceObj | None’ = None, device_orientation: ‘Rotation | None’ = None, processing: ‘ProcessingRecipe | None’ = None, ir_processing_info: ‘IRProcessingInfo | None’ = None, dataframe_row: ‘dict | None’ = None)
- __init__(source: Source, receiver: Receiver, simulation: Simulation, device: DeviceObj | None = None, device_orientation: Rotation | None = None, processing: ProcessingRecipe | None = None, ir_processing_info: IRProcessingInfo | None = None, dataframe_row: dict | None = None) None
- get_device_ir(data_loader: IRDataLoader | None = None, apply_filters: bool = True, include_spatial_ir: bool = False) DeviceIR
Get DeviceIR object from IRInfo. If apply_filters is True, the filters are applied to the resulting IR. :param data_loader: Optional but recommended. IRDataLoader object to use for loading the IR data to/from cache. If None, a new lazy IRDataLoader will be created which will load data to a temporary directory. :param apply_filters: If True, the filters are applied to the resulting IR. Defaults to True. :param include_spatial_ir: If set and IR has been processed remotely the spatial IR part can be skipped. If IR needs to be rendered on-the-fly the SpatialIR is always included.
- get_mono_ir(data_loader: IRDataLoader | None = None, apply_filters: bool = True) MonoIR
Get MonoIR object from IRInfo. If apply_filters is True, the filters are applied to the resulting IR. :param data_loader: Optional but recommended. IRDataLoader object to use for loading the IR data to/from cache. If None, a new lazy IRDataLoader will be created which will load data to a temporary directory. :param apply_filters: If True, the filters are applied to the resulting IR. Defaults to True.
- get_moving_ir(data_loader: IRDataLoader | None = None) MovingIR
Get MovingIR object from IRInfo. :param data_loader: Optional but recommended. IRDataLoader object to use for loading the IR data to/from cache. If None, a new lazy IRDataLoader will be created which will load data to a temporary directory.
- get_spatial_ir(data_loader: IRDataLoader | None = None, apply_filters: bool = True) SpatialIR
Get SpatialIR object from IRInfo. If apply_filters is True, the filters are applied to the resulting IR. :param data_loader: Optional but recommended. IRDataLoader object to use for loading the IR data to/from cache. If None, a new lazy IRDataLoader will be created which will load data to a temporary directory. :param apply_filters: If True, the filters are applied to the resulting IR. Defaults to True.
- device_orientation: Rotation | None = None
- property id: str
- ir_processing_info: IRProcessingInfo | None = None
- processing: ProcessingRecipe | None = None
- receiver: Receiver
- simulation: Simulation
- source: Source
- class treble_tsdk.collections.ir_info.IRProcessingInfo
IRProcessingInfo(ir_id: ‘str’, task_id: ‘str’)
- classmethod from_struct(s: dict[str, str | None]) IRProcessingInfo
- ir_id: str
- task_id: str
- class treble_tsdk.collections.ir_info.ProcessingRecipe
ProcessingRecipe(filters: ‘list[FilterDefinition]’ = None, filter_structs: ‘list[dict]’ = None)
- __init__(filters: list[FilterDefinition] | None = None, filter_structs: list[dict] | None = None) None
- get_filters() list[FilterDefinition] | None
Return the live filter definitions, reconstructing them from
filter_structsif they haven’t been populated yet. Returns None when no filters are specified.filtersis only set when filters are prescribed in-memory; a recipe rebuilt from a dataframe only carriesfilter_structs. This back-fillsfiltersfrom those structs so both stay in sync.
- filters: list[FilterDefinition] = None
- treble_tsdk.collections.ir_info.compute_ir_unique_id(source_id: str, receiver_id: str, device_id: str | None = None, device_orientation: Rotation | list[float] | None = None, filter_structs: list[dict] | None = None) str
Compute the canonical unique id for an IR.
Single source of truth for hashing an IR’s identifying fields into a stable string id.
- Parameters:
source_id (str) – The id of the source.
receiver_id (str) – The id of the receiver.
device_id (str | None) – The id of the device, if any.
device_orientation (Rotation | list[float] | None) – The device orientation. Lists are converted to Rotation so the id is stable regardless of the input shape.
filter_structs (list[dict] | None) – The processing filter chain, if any.
- Return str:
The hex MD5 digest used as the IR’s stable id.