18 lines
798 B
Python
18 lines
798 B
Python
import json, sys
|
|
path = sys.argv[1] if len(sys.argv) > 1 else '/mnt/d/Resonance_Engine/traj/validation_20260608_205129/events_EVENT_B_consolidation.jsonl'
|
|
e = [json.loads(l) for l in open(path)]
|
|
def k(x): return x.get('event', {}).get('kind', '')
|
|
def m(x): return x.get('minute_idx', 0)
|
|
def col(x): return x.get('event', {}).get('col', -1)
|
|
cons = [x for x in e if k(x) == 'consolidation']
|
|
brk = [x for x in e if k(x) == 'breakout']
|
|
early_c = [x for x in cons if m(x) < 30]
|
|
late_c = [x for x in cons if m(x) >= 30]
|
|
print(f"consolidation total={len(cons)} early(<30)={len(early_c)} late(>=30)={len(late_c)}")
|
|
print(f"breakout total={len(brk)}")
|
|
if cons:
|
|
print(f"first consolidation minute: {min(m(x) for x in cons)}")
|
|
print("first 5 events:")
|
|
for x in e[:5]:
|
|
print(" ", m(x), k(x), col(x))
|