sessions of 2026-11-18 (the optimization campaign; three runs without summary, interrupted and rerun)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8a81c53cd9
commit
0cfbd1b7bc
363 files changed
+30822
No files matched your search
+22
@@ -0,0 +1,22 @@
|
||||
"""Removes the Kendall-tau (STEADY) condition of the slow drift from a displacement.py and its thresholds.md line. Args: <detectors folder>"""
|
||||
import sys
|
||||
from pathlib import Path
|
||||
root = Path(sys.argv[1])
|
||||
p = root / "scripts" / "displacement.py"
|
||||
s = p.read_text()
|
||||
for old, new in [
|
||||
("at least SIZE median daily amplitudes, |Kendall tau| ≥ STEADY, and\n# no step", "at least SIZE median daily amplitudes, and no\n# step"),
|
||||
("amplitudes, with\n# the same tau and step conditions;", "amplitudes, with\n# the same step condition;"),
|
||||
("STEADY = 0.6 # D-055\n", ""),
|
||||
(" tau = sum((lv[j] > lv[i]) - (lv[j] < lv[i]) for i, j in pairs) / len(pairs)\n", ""),
|
||||
("SIZE * ampl and abs(tau) >= STEADY and step", "SIZE * ampl and step"),
|
||||
(" signs = step = 0\n", " step = 0\n"),
|
||||
(" signs += sum((lv[j] > lv[k]) - (lv[j] < lv[k]) for k in range(i, j)) # Kendall tau, step by step\n", ""),
|
||||
("step <= abs(d) / 2 \\\n and signs * (1 if d > 0 else -1) >= STEADY * n * (n - 1) / 2:", "step <= abs(d) / 2:"),
|
||||
]:
|
||||
assert s.count(old) == 1, old
|
||||
s = s.replace(old, new)
|
||||
p.write_text(s)
|
||||
t = root / "thresholds.md"
|
||||
lines = [x for x in t.read_text().splitlines(keepends=True) if not x.startswith("| | `STEADY` |")]
|
||||
t.write_text("".join(lines))
|
||||
Reference in new issue
Block a user