# ぶれなしで横の境目 d*/r* を速さごとに測る（I/B=64 と 16）。予想: d* ∝ v^(-1/2)、k・r* によらない
import json, xsec
xsec.ZLO=1.0
for IB in (64.0,16.0):
    rs=IB**0.5
    for v in (0.75,1.5,3.0,6.0):
        r=xsec.run(IB,X0=48,hold=True,level=True,N=3000,zhi=2.0,k=8.0,seg=True,W=6*rs,noise=0.0,speed=v)
        p=r['prof']; edge=sum(0.25*c for a,n,c in p if c is not None)  # 来た割合の和×刻み＝境目（切り立っていれば）
        print(json.dumps(dict(IB=IB,speed=v,edge_over_rs=round(edge,3),sig_ever=round(r['sig_ever'],2))),flush=True)
