当前位置: 首页>>代码示例>>Python>>正文


Python FlatLambdaCDM.kpc_proper_arcmin方法代码示例

本文整理汇总了Python中astropy.cosmology.FlatLambdaCDM.kpc_proper_arcmin方法的典型用法代码示例。如果您正苦于以下问题:Python FlatLambdaCDM.kpc_proper_arcmin方法的具体用法?Python FlatLambdaCDM.kpc_proper_arcmin怎么用?Python FlatLambdaCDM.kpc_proper_arcmin使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在astropy.cosmology.FlatLambdaCDM的用法示例。


在下文中一共展示了FlatLambdaCDM.kpc_proper_arcmin方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: FlatLambdaCDM

# 需要导入模块: from astropy.cosmology import FlatLambdaCDM [as 别名]
# 或者: from astropy.cosmology.FlatLambdaCDM import kpc_proper_arcmin [as 别名]
import astropy.units as u
import astropy.constants as const
from astropy.cosmology import FlatLambdaCDM

G = const.G.to(u.Mpc**3/u.Gyr**2/(1.e10*u.solMass)).value
sig0 = (1.e-3 *u.g/u.cm**2).to(1.e10*u.solMass/u.Mpc**2).value
pram0 = (1.e-11 * u.erg/u.cm**3).to(1.e10*u.solMass/u.Mpc/u.Gyr**2).value

nH_ne = 0.852

H0 = 70.
cosmo = FlatLambdaCDM(H0=H0, Om0=0.3)

DA = lambda z: cosmo.angular_diameter_distance(z).to(u.cm).value
# Return proper distance [Mpc] for a given redshift and sep. in arcsec
properDist = lambda arcsec, z: arcsec*cosmo.kpc_proper_arcmin(z)/60./1000.

def EI(norm, z):
  return 10 ** (np.log10(norm) + np.log10(4*np.pi) + 2*np.log10( DA(z)*(1 + z) )  + 14)

def R_delta(delta, z, kT, beta_T=1.05):
  delta_z = (delta * cosmo.Om0) / (18*np.pi**2 * cosmo.Om(z)) 
  return 3.8 * np.sqrt(beta_T* (kT/10.) / (delta_z*(1+z)**3) ) / (H0/50.)

def calcLum(flux, z):
  return 4*np.pi*10**(2*np.log10(cosmo.luminosity_distance(z).to(u.cm).value) + np.log10(flux) )

开发者ID:conormcp,项目名称:SCI,代码行数:28,代码来源:constants.py


注:本文中的astropy.cosmology.FlatLambdaCDM.kpc_proper_arcmin方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。