suboptimumg.log_analysis.yaw_artifact#
- class suboptimumg.log_analysis.yaw_artifact.SegmentationConfig[source]#
Bases:
BaseModelA record of how one log was cut into sub-windows.
Recorded alongside the sub-windows so a saved artifact answers “where did these come from” without re-reading the notebook that made it.
Fields# Field
Type
Required
Default
floatNo
0.0strYes
list[tuple[float,float]]No
factory
list[MaskReport]No
factory
floatNo
7.0floatNo
4.0floatNo
8.0floatNo
100.0tuple[float,float] |NoneNo
None- Parameters:
logfile (str)
trim_range_s (tuple[float, float] | None)
manual_windows (list[tuple[float, float]])
gps_lag_s (float)
min_speed_mps (float)
max_slip_deg (float)
min_window_s (float)
target_hz (float)
mask_reports (list[MaskReport])
- gps_lag_s: float#
- logfile: str#
- manual_windows: list[tuple[float, float]]#
- mask_reports: list[MaskReport]#
- max_slip_deg: float#
- min_speed_mps: float#
- min_window_s: float#
- target_hz: float#
- trim_range_s: tuple[float, float] | None#
- class suboptimumg.log_analysis.yaw_artifact.YawArtifact[source]#
Bases:
BaseModelOne log’s yaw-response work: its sub-windows, how they were made, and the fits.
Bundles everything a later session needs to re-evaluate or compare against this log without re-running preparation.
save/loadround-trip it through pickle, because the PERDASingleRunDatasub-windows have no JSON form. Treat the file as a local cache, not an interchange format: it is tied to the installed PERDA/pydantic versions, and loading one executes arbitrary code, so only load artifacts you produced.Fields# Field
Type
Required
Default
Yes
dict[str,YawFit]No
factory
strYes
list[SingleRunData]Yes
- Parameters:
log_name (str)
config (SegmentationConfig)
subwindows (list[SingleRunData])
fits (dict[str, YawFit])
- add_fit(fit)[source]#
Record
fitunder its spec name, replacing any fit of that name.- Parameters:
fit (YawFit)
- Return type:
None
- config: SegmentationConfig#
- static load(path)[source]#
Inverse of
save. Only load artifacts you produced – see the class docstring.- Raises:
TypeError – If
pathdoes not hold aYawArtifact.- Parameters:
path (str | Path)
- Return type:
- log_name: str#
- save(path)[source]#
Pickle this artifact to
path, creating parent directories.- Returns:
The resolved output path.
- Return type:
Path
- Parameters:
path (str | Path)
- subwindows: list[SingleRunData]#