chore: remove four obsolete scripts

- scripts/backfill_event_zc_freq.py copied ZC frequency from Blastware
  reports into the DB; the decoder reads it from the file since v0.35.0,
  whose backfill refreshed every row.  Its two tests go with it; the DB
  column tests in test_zc_freq_columns.py stay.
- scripts/backfill_record_type.py: a one-time fix from May; the record
  type is read from the file since v0.33.0.
- scripts/test_thor_render.py: a one-off re-import of two prod Thor files
  (May); nothing referenced it.
- scratch/next_experiment_skeleton.py: codec research scaffolding from
  before the codec was solved.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01ALX2R8pghDaZuti9U7mEE9
This commit is contained in:
serversdownandClaude Opus 5.5 committed 2026-11-20 13:39:23 -05:00
1 parent 646da046b7
commit 638ac58b4d
5 files changed
-748

No files matched your search

-49
View File
@@ -123,52 +123,3 @@ def test_upsert_updates_zc_freq(tmp_path: Path):
row = db.query_events(serial="BE11529")[0]
assert row["vert_zc_freq"] == 91.0
def test_backfill_zc_freq_from_sidecar(tmp_path: Path):
import importlib
mod = importlib.import_module("scripts.backfill_event_zc_freq")
db = SeismoDb(tmp_path / "seismo_relay.db")
# Insert an event WITHOUT freq (simulates a pre-feature row), with a filename.
from minimateplus.models import Event, Timestamp
ev = Event(index=0)
ev._waveform_key = bytes.fromhex("01110000")
ev.timestamp = Timestamp(raw=b"", flag=0x10, year=2026, unknown_byte=0,
month=6, day=25, hour=8, minute=50, second=0)
ev.record_type = "Waveform"
db.insert_events([ev], serial="BE11529",
waveform_records={"01110000": {"filename": "M529AAAA.AB0T"}})
class FakeStore:
def load_sidecar(self, serial, filename):
return {"bw_report": {
"peaks": {"vert": {"zc_freq_hz": 85.0},
"tran": {"zc_freq_hz": 100.0, "zc_freq_above_range": True}},
"mic": {"zc_freq_hz": 51.0}}}
counts = mod.backfill_zc_freq(db, FakeStore())
assert counts["updated"] == 1
row = db.query_events(serial="BE11529")[0]
assert row["vert_zc_freq"] == 85.0
assert row["tran_zc_above_range"] == 1
assert row["mic_zc_freq"] == 51.0
def test_backfill_skips_event_without_sidecar(tmp_path: Path):
import importlib
mod = importlib.import_module("scripts.backfill_event_zc_freq")
db = SeismoDb(tmp_path / "seismo_relay.db")
from minimateplus.models import Event, Timestamp
ev = Event(index=0)
ev._waveform_key = bytes.fromhex("01110000")
ev.timestamp = Timestamp(raw=b"", flag=0x10, year=2026, unknown_byte=0,
month=6, day=25, hour=8, minute=50, second=0)
db.insert_events([ev], serial="BE11529",
waveform_records={"01110000": {"filename": "M529AAAA.AB0T"}})
class NoneStore:
def load_sidecar(self, serial, filename): return None
counts = mod.backfill_zc_freq(db, NoneStore())
assert counts["updated"] == 0
assert counts["skipped_no_sidecar"] == 1