suboptimumg.log_analysis.yaw_artifact#

class suboptimumg.log_analysis.yaw_artifact.SegmentationConfig[source]#

Bases: BaseModel

A 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

gps_lag_s

float

No

0.0

logfile

str

Yes

manual_windows

list[tuple[float, float]]

No

factory

mask_reports

list[MaskReport]

No

factory

max_slip_deg

float

No

7.0

min_speed_mps

float

No

4.0

min_window_s

float

No

8.0

target_hz

float

No

100.0

trim_range_s

tuple[float, float] | None

No

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: BaseModel

One 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 / load round-trip it through pickle, because the PERDA SingleRunData sub-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

config

SegmentationConfig

Yes

fits

dict[str, YawFit]

No

factory

log_name

str

Yes

subwindows

list[SingleRunData]

Yes

Parameters:
add_fit(fit)[source]#

Record fit under its spec name, replacing any fit of that name.

Parameters:

fit (YawFit)

Return type:

None

config: SegmentationConfig#
fits: dict[str, YawFit]#
static load(path)[source]#

Inverse of save. Only load artifacts you produced – see the class docstring.

Raises:

TypeError – If path does not hold a YawArtifact.

Parameters:

path (str | Path)

Return type:

YawArtifact

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]#