# 灯りの近くで高さの制御を弱めた版: 灯りより下の帯が入るか、帯ごとの新月/満月比（灯り 1.5 m、k=16、到達、開けた場所）
import json, xsec
for lo,hi in ((0.5,1.1),(0.5,2.5),(3.0,5.0),(7.0,9.0)):
    xsec.ZLO=lo; out={}
    for lab,I in (('新月',400.0),('満月',3.2)):
        r=xsec.run(I,X0=48,hold=True,level=True,release=True,N=3000,zhi=hi,k=16.0); out[lab]=(r['sig_hit'],r['sig_crash_near'],r['sig_crash_far'])
    n,f=out['新月'][0],out['満月'][0]
    print(json.dumps(dict(band=[lo,hi],new=round(n,2),full=round(f,2),ratio=round(n/f,2) if f>0 else None,new_crash_near=round(out['新月'][1],2),new_crash_far=round(out['新月'][2],2))),flush=True)
