perda.core_data_structures.single_run_data#
- pydantic model perda.core_data_structures.single_run_data.SingleRunData[source]#
Bases:
BaseModelPydantic model to store parsed CSV data with dictionary-like lookup.
- Config:
arbitrary_types_allowed: bool = True
- Fields:
- Validators:
_build_keyword_index»all fields
- field id_to_instance: dict[int, DataInstance] [Required]#
Mapping from variable ID to DataInstance
- Validated by:
_build_keyword_index
- field cpp_name_to_id: dict[str, int] [Required]#
Mapping from variable name to variable ID
- Validated by:
_build_keyword_index
- field id_to_cpp_name: dict[int, str] [Required]#
Mapping from variable ID to variable name
- Validated by:
_build_keyword_index
- field id_to_descript: dict[int, str] [Required]#
Mapping from variable ID to variable description
- Validated by:
_build_keyword_index
- field creation_time: datetime | None = None#
Timestamp when this run log was recorded
- Validated by:
_build_keyword_index
- field total_data_points: int [Required]#
Total number of data points across all variables
- Validated by:
_build_keyword_index
- field data_start_time: int [Required]#
Start timestamp in log timestamp unit
- Validated by:
_build_keyword_index
- field data_end_time: int [Required]#
End timestamp in log timestamp unit
- Validated by:
_build_keyword_index
- field timestamp_unit: Timescale = Timescale.MS#
Timestamp logging unit for this run (ms/us)
- Validated by:
_build_keyword_index
- field concat_boundaries: list[int] [Optional]#
Timestamps where concatenated runs begin (post-shift)
- Validated by:
_build_keyword_index
- field semantic_index: VariableSemanticIndex | None = None#
Vector index over variable descriptions. None when semantic search is disabled or unavailable
- Validated by:
_build_keyword_index
- field keyword_index: VariableKeywordIndex [Optional]#
Normalized name and description text backing keyword search
- Validated by:
_build_keyword_index
- add(cpp_name, di)[source]#
Insert a new derived DataInstance using a synthetic negative ID.
- Parameters:
cpp_name (str) – C++ variable name key for the new variable.
di (DataInstance) – DataInstance to insert.
- Return type:
None
- replace(cpp_name, di)[source]#
Overwrite the values of an existing variable in-place.
- Parameters:
cpp_name (str) – C++ variable name of the variable to replace.
di (DataInstance) – DataInstance whose
value_npthat replaces the stored one.
- Return type:
None