import json
from pathlib import Path
p=json.loads((Path(__file__).resolve().parent.parent/'model/compact_festival_source_packet.json').read_text())
for name in p['orders']:
    weights=p['weights'] if name=='forward' else list(reversed(p['weights']))
    total=0; dates=[p['anchor_BC']]
    for weight in weights:
        total+=weight; dates.append(p['anchor_BC']-p['scale']*total)
    print(name, dates)
