sources.py 文件源码

python
阅读 24 收藏 0 点赞 0 评论 0

项目:rswarp 作者: radiasoft 项目源码 文件源码
def compute_cutoff_beta(T, frac=0.99):
    """Returns the velocity for which the fraction frac of a beam emitted from a thermionic
    cathode with temperature T move more slowly in the longitudinal (z) direction.

    Arguments:
        T (float)               : temperature of the cathode in K
        frac (Optional[float])  : Fraction of beam with vz < cutoff. Defaults to 0.99.

    Returns:
        beta_cutoff (float)     : cutoff velocity divided by c.

    """

    sigma = np.sqrt(2*kb_J*T/m)  # effective sigma for half-Gaussian distribution

    multiplier = erfinv(frac)  # the multiplier on sigma accounting for frac of the distribution

    return multiplier*sigma/c
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号