本文整理汇总了Python中atpy.Table.SMASS[i]方法的典型用法代码示例。如果您正苦于以下问题:Python Table.SMASS[i]方法的具体用法?Python Table.SMASS[i]怎么用?Python Table.SMASS[i]使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类atpy.Table
的用法示例。
在下文中一共展示了Table.SMASS[i]方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: str
# 需要导入模块: from atpy import Table [as 别名]
# 或者: from atpy.Table import SMASS[i] [as 别名]
# fit BTmag to stellar_mass and then find all galaxies that don't have a K band flux and convert
fit = np.polyfit(BTmag[w], log_mass, 1)
BT2Stellar = np.poly1d(fit)
print "m" + str(fit)
#set stellar mass coloumn with all galaxies that have mass's
cat['SMASS'] = 1.0
cat['SMASS'][w] = log_mass
#extract all galaxies without colours and K band magnites
if True:
for i in range(0, len(cat)):
#test to see if there is already a stellar mass there
if cat.SMASS[i] == 1.0: cat.SMASS[i] = BT2Stellar(cat.BTmag[i])
else:
print 'mass already present from K band and colour'
#load complete cols into mass and BT
mass = cat.SMASS
BT = cat.BTmag
cat.write(pj(folder,'stellar-mass-fornax_final.fits'),overwrite=True)
figM = plt.figure(figsize=(4.5, 4.5), facecolor='w', edgecolor='k')
subfi = plt.subplot(1,1,1)
#plot
subfi.plot(BT, BT2Stellar(BT), 'k')
#subfi.scatter(BT, mass, s=30, c='r', marker='+')
subfi.scatter(BT[w], mass[w], s=30, c='b', marker='+')