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
评论列表
文章目录