added gpr speed tracking

This commit is contained in:
Ayzen
2026-04-01 22:05:04 +03:00
parent 669205d8f8
commit 4b78c2808d
20 changed files with 1165 additions and 47 deletions
+7
View File
@@ -41,6 +41,13 @@ def serialize_trace_collection(collection: SweepCollection, magic: int) -> bytes
_write_interleaved_complex(buffer, s11)
_write_interleaved_complex(buffer, s21)
buffer.extend(
struct.pack(
"<QQ",
int(collection.capture_start_ns),
int(collection.capture_end_ns),
)
)
return bytes(buffer)
+4
View File
@@ -117,6 +117,8 @@ def save_trace_history_binary(stage_dir: Path, history: list[SweepCollection], m
{
"collection_id": collection.collection_id,
"monotonic_ns": collection.monotonic_ns,
"capture_start_ns": int(collection.capture_start_ns),
"capture_end_ns": int(collection.capture_end_ns),
"trace_count": len(collection.traces),
},
indent=2,
@@ -178,6 +180,8 @@ def save_trace_history_numpy(stage_dir: Path, history: list[SweepCollection]) ->
{
"collection_id": int(collection.collection_id),
"monotonic_ns": int(collection.monotonic_ns),
"capture_start_ns": int(collection.capture_start_ns),
"capture_end_ns": int(collection.capture_end_ns),
"trace_count": len(collection.traces),
"traces": traces_meta,
},
+4
View File
@@ -64,6 +64,8 @@ class NpzStore(StoreApi):
meta = {
"collection_id": int(collection.collection_id),
"monotonic_ns": int(collection.monotonic_ns),
"capture_start_ns": int(collection.capture_start_ns),
"capture_end_ns": int(collection.capture_end_ns),
"combos": combo_records,
}
meta_path.write_text(json.dumps(meta, indent=2), encoding="utf-8")
@@ -98,6 +100,8 @@ class NpzStore(StoreApi):
collection_id=int(meta["collection_id"]),
monotonic_ns=int(meta["monotonic_ns"]),
traces=traces,
capture_start_ns=int(meta.get("capture_start_ns", 0)),
capture_end_ns=int(meta.get("capture_end_ns", 0)),
)
def list_sets(self, kind: str, radar_key: str) -> list[str]: