diff options
author | Aaron LI <aly@aaronly.me> | 2017-06-23 20:39:27 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-06-23 20:39:27 +0800 |
commit | 0f4f81d874b7b372c96f5b1398f11a6f2e24367c (patch) | |
tree | c494934ed4387700e53d5b7771a572b24e03e5e5 /fg21sim/extragalactic/clusters/formation.py | |
parent | 745cc1b0001236242eb4790e71a3b60c0388eb4f (diff) | |
download | fg21sim-0f4f81d874b7b372c96f5b1398f11a6f2e24367c.tar.bz2 |
halo.py + formation.py: Add argument z0
Diffstat (limited to 'fg21sim/extragalactic/clusters/formation.py')
-rw-r--r-- | fg21sim/extragalactic/clusters/formation.py | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/fg21sim/extragalactic/clusters/formation.py b/fg21sim/extragalactic/clusters/formation.py index 1f48433..62ee297 100644 --- a/fg21sim/extragalactic/clusters/formation.py +++ b/fg21sim/extragalactic/clusters/formation.py @@ -42,7 +42,10 @@ class ClusterFormation: Parameters ---------- M0 : float - Present-day (z=0) mass (unit: Msun) of the cluster. + Cluster mass at redshift z0 + Unit: [Msun] + z0 : float + Redshift from where to simulate former merging history. configs : `ConfigManager` A `ConfigManager` instance containing default and user configurations. For more details, see the example configuration specifications. @@ -54,8 +57,9 @@ class ClusterFormation: mtree : `~MergerTree` Merging history of this cluster. """ - def __init__(self, M0, configs): + def __init__(self, M0, z0, configs): self.M0 = M0 # [Msun] + self.z0 = z0 self.configs = configs self._set_configs() @@ -182,8 +186,11 @@ class ClusterFormation: References: Ref.[1],Sec.(3.1) """ logger.info("Simulating cluster formation: " + - "M0={:.3g}[Msun] ...".format(self.M0)) - self.mtree = self._trace_formation(self.M0, dMc=self.merger_mass_min) + "M0={:.3g}[Msun] from z={:.2f} ...".format( + self.M0, self.z0)) + self.mtree = self._trace_formation(self.M0, + dMc=self.merger_mass_min, + _z=self.z0) logger.info("Simulated cluster formation with merger tree") return self.mtree |