def runbetaeta(Epn, height, fit="linear"): gamma = (Epn/nucleonmass) + 1 beta = math.sqrt(1 - (1/gamma**2)) if fit == "linear": refractiveindex = atm.runindex(height) elif fit == "exp": refractiveindex = atm.expindex(height) return beta, refractiveindex
def runtheta(Epn, height, fit="linear"): gamma = (Epn/nucleonmass) + 1 beta = math.sqrt(1 - (1/gamma**2)) if fit == "linear": refractiveindex = atm.runindex(height) elif fit == "exp": refractiveindex = atm.expindex(height) costheta = 1/(beta*refractiveindex) if costheta < 1: theta=math.acos(costheta) else: theta=0 return theta