plot_heating_correlations.py 文件源码

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

项目:CAAPR 作者: Stargrazer82301 项目源码 文件源码
def getRadius(ra,dec):

    # M31 properties
    PA = 38.1
    inclin = 77.5
    centre = [10.77615,41.353394] # Center of our current FOV.
    #centre = [10.612508,41.208711] # Center from Viaene et al 2014
    dist = 0.785

    #Deproject the pixels to a physical radial distance.
    # convert angles to radians
    PA = ((90.-PA) / 180.0 * math.pi)
    inclin = inclin / 180.0 * math.pi

    radius = np.zeros(len(ra))
    for i in range(0,len(ra)):
        Xsquare = ((ra[i] - centre[0])*math.cos(dec[i] / 180.0 * math.pi)*math.cos(PA) + (dec[i] - centre[1])*math.sin(PA))**2
        Ysquare = (-(ra[i] - centre[0])*math.cos(dec[i] / 180.0 * math.pi)*math.sin(PA) + (dec[i] - centre[1])*math.cos(PA))**2
        radius[i] = math.sqrt(Xsquare + Ysquare / math.cos(inclin)**2.0)
        radius[i] = 2.0 * dist * 1000.0 * math.tan(radius[i]*math.pi/(180.0*2.0))

    return radius
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号