本文整理匯總了Python中astropy.cosmology.Planck13.comoving_transverse_distance方法的典型用法代碼示例。如果您正苦於以下問題:Python Planck13.comoving_transverse_distance方法的具體用法?Python Planck13.comoving_transverse_distance怎麽用?Python Planck13.comoving_transverse_distance使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類astropy.cosmology.Planck13
的用法示例。
在下文中一共展示了Planck13.comoving_transverse_distance方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: Table
# 需要導入模塊: from astropy.cosmology import Planck13 [as 別名]
# 或者: from astropy.cosmology.Planck13 import comoving_transverse_distance [as 別名]
qsos['id'] = np.arange(len(qsos))+1
#Read cluster-pair catalog; will read from both SDSS and DES
# cl_datasets = ['sdss_dr8','des_sva1']
cl_datasets = [redmapper_dataset]
cpairs = Table()
for cl_d in cl_datasets:
cpairs_aux = fits.getdata('cpairs_richmin{}_l{}_{}.fits'.format(int(params['richmin']),int(params['max_tsep']), cl_d))
cpairs_aux = Table(cpairs_aux)
cpairs_aux['dataset'] = cl_d
cpairs = vstack([cpairs,cpairs_aux])
#add objid to cpairs
cpairs.add_column(Column(name='objid',data=np.arange(len(cpairs))+1))
#add comoving line of sight distance for transverse calculation in mpc
losd = cosmo.comoving_transverse_distance(cpairs['redshift']).value
cpairs.add_column(Column(name='losd_mpc',data=losd))
#For a given QSO, store the ids of cluster-pairs within d Mpcs
ids = []
y_mpc = [] #impact parameters
x_mpc = [] #distance to closest cluster along axis
for qso in qsos:
ids_aux = []
y_mpc_aux = []
x_mpc_aux = []
#QSO coordinates
ra0 = qso['ra']