# 灯りの高さと飛ぶ高さの帯の組み合わせで新月/満月比（到達、開けた場所、k=16）。仮説: 比を決めるのは灯りとの高さの差と満月の r*(約1.8 m)の大小
import json, numpy as np, xsec
for hl,hb in ((4.0,4.0),(4.0,1.5),(8.0,8.0)):
    xsec.LAMP=np.array([0,0,hl]); xsec.ZLO=hb-1.0
    out={}
    for lab,I in (('新月',400.0),('満月',3.2)):
        r=xsec.run(I,X0=48,hold=True,level=True,N=3000,zhi=hb+1.0,k=16.0); out[lab]=r['sig_hit']
    print(json.dumps(dict(lamp=hl,band=hb,new=round(out['新月'],2),full=round(out['満月'],2),ratio=round(out['新月']/max(out['満月'],1e-9),2))),flush=True)
