SimulSelectedFrom3FHL.py 文件源码

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

项目:CTAtools 作者: davidsanchez 项目源码 文件源码
def GetInfoFromTable(fitstable,indice):
    '''read salvatore table and return info corresponding to the source at the place indice
    Parameters
    ---------
    fitstable : pyfits object : table to be browsed
    indice : place of the source in the table
    '''
    data = fitstable[1].data[indice]
    sourcename = data[0]
    ra = data[1]
    dec = data[2]
    z = data[4]

    if math.isnan(z):
        z=0
    hemisphere = data[6]
    observation_type = data[8]
    if hemisphere =='S':
        hemisphere ='South'
    if hemisphere =='N':
        hemisphere ='North'

    return sourcename,ra,dec,z,hemisphere,observation_type
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号