rkr.py 文件源码

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

项目:PyDiatomic 作者: stggh 项目源码 文件源码
def formPEC(R, Rmin, Rmax, E, De, limb):
    evcm = const.e/(const.c*const.h*100) # converts cm-1 to eV

    # combine Rmin with Rmax to form PEC
    Re = (Rmin[0] + Rmax[0])/2
    print(u"RKR: Re = {:g}".format(Re))

    RTP = np.append(Rmin[::-1], Rmax, 0)  # radial positions of turning-points
    PTP = np.append(E[::-1], E, 0)  # potential energy at turning point

    # interpolate
    psp = splrep(RTP, PTP, s=0)
    # Interpolate RKR curve to this grid
    PEC = splev(R, psp, der=0)

    # extrapolate using analytical function
    inner_limb_Morse(R, PEC, RTP, PTP, Re, De)
    if limb=='L': 
        outer_limb_LeRoy(R, PEC, RTP, PTP, De)
    else:
        outer_limb_Morse(R, PEC, RTP, PTP, De)

    PTP /= evcm
    PEC /= evcm  # convert to eV

    return PEC, RTP, PTP

# analytical functions
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号