aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/extragalactic/clusters/formation.py
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-07-22 23:53:20 +0800
committerAaron LI <aly@aaronly.me>2017-07-22 23:53:20 +0800
commit4476a0ca0e22d6a35bb07da87956d21ec7c49074 (patch)
tree8bbbc491e34956c77d8a1b2f3e38c868fd4e3677 /fg21sim/extragalactic/clusters/formation.py
parentfd5ae04bce31a4cb82dea8532028b6df92b3d476 (diff)
downloadfg21sim-4476a0ca0e22d6a35bb07da87956d21ec7c49074.tar.bz2
Use all uppercase to identify the global CONFIGS and COSMO
Update to use the global CONFIGS and COSMO Signed-off-by: Aaron LI <aly@aaronly.me>
Diffstat (limited to 'fg21sim/extragalactic/clusters/formation.py')
-rw-r--r--fg21sim/extragalactic/clusters/formation.py14
1 files changed, 7 insertions, 7 deletions
diff --git a/fg21sim/extragalactic/clusters/formation.py b/fg21sim/extragalactic/clusters/formation.py
index a036069..02b26f4 100644
--- a/fg21sim/extragalactic/clusters/formation.py
+++ b/fg21sim/extragalactic/clusters/formation.py
@@ -21,7 +21,7 @@ import scipy.special
import scipy.optimize
from .mergertree import MergerTree
-from ...utils import cosmo
+from ...utils import COSMO
logger = logging.getLogger(__name__)
@@ -98,7 +98,7 @@ class ClusterFormation:
References: Ref.[1],Eq.(2)
"""
alpha = self.sigma_index
- sigma = cosmo.sigma8 * (mass / cosmo.M8) ** (-alpha)
+ sigma = COSMO.sigma8 * (mass / COSMO.M8) ** (-alpha)
return sigma
def f_delta_c(self, z):
@@ -110,7 +110,7 @@ class ClusterFormation:
References: Ref.[1],App.A,Eq.(A1)
"""
- return cosmo.overdensity_crit(z)
+ return COSMO.overdensity_crit(z)
def f_dw_max(self, mass):
"""
@@ -145,7 +145,7 @@ class ClusterFormation:
References: Ref.[1],Sec.(3)
"""
alpha = self.sigma_index
- mass = cosmo.M8 * (S / cosmo.sigma8**2)**(-1/(2*alpha))
+ mass = COSMO.M8 * (S / COSMO.sigma8**2)**(-1/(2*alpha))
return mass
@staticmethod
@@ -251,7 +251,7 @@ class ClusterFormation:
Mc = self.M0
mtree_root = MergerTree(data={"mass": Mc,
"z": zc,
- "age": cosmo.age(zc)})
+ "age": COSMO.age(zc)})
logger.debug("[main] z=%.4f : mass=%g [Msun]" % (zc, Mc))
mtree = mtree_root
@@ -272,7 +272,7 @@ class ClusterFormation:
dS = self.gen_dS(dw)
# Progenitor properties
z1 = self.calc_z(w2 + dw)
- age1 = cosmo.age(z1)
+ age1 = COSMO.age(z1)
S1 = S2 + dS
M1 = self.calc_mass(S1)
dM = Mc - M1
@@ -310,7 +310,7 @@ class ClusterFormation:
merger tree.
"""
z = 0.0 if _z is None else _z
- node_data = {"mass": M, "z": z, "age": cosmo.age(z)}
+ node_data = {"mass": M, "z": z, "age": COSMO.age(z)}
# Whether to stop the trace
if self.zmax is not None and z > self.zmax: