diff options
author | Aaron LI <aly@aaronly.me> | 2019-01-29 16:01:20 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2019-01-29 16:01:20 +0800 |
commit | 9221e0a28f302e2735cc68eda61048fe1d08725e (patch) | |
tree | 1afa2cce9dee2db309ef9c46807ddfd081443e31 /fg21sim/extragalactic | |
parent | b60e1c2232d9f8e187ecb877b323154445b991f6 (diff) | |
download | fg21sim-9221e0a28f302e2735cc68eda61048fe1d08725e.tar.bz2 |
clusters/formation: Add show() method
Diffstat (limited to 'fg21sim/extragalactic')
-rw-r--r-- | fg21sim/extragalactic/clusters/formation.py | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/fg21sim/extragalactic/clusters/formation.py b/fg21sim/extragalactic/clusters/formation.py index dc39b62..83e145f 100644 --- a/fg21sim/extragalactic/clusters/formation.py +++ b/fg21sim/extragalactic/clusters/formation.py @@ -23,7 +23,7 @@ import scipy.integrate import scipy.special import scipy.optimize -from .mergertree import MergerTree, get_history +from .mergertree import MergerTree, get_history, show_mtree from ...share import COSMO @@ -278,6 +278,14 @@ class ClusterFormation: """ return self.history(mtree=mtree, merger_only=True) + def show(self, mtree=None): + """ + Print the formation history nicely. + """ + if mtree is None: + mtree = self.mtree + show_mtree(mtree) + def _trace_main(self): """ Iteratively trace the merger and accretion events of the main |