From 9221e0a28f302e2735cc68eda61048fe1d08725e Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Tue, 29 Jan 2019 16:01:20 +0800 Subject: clusters/formation: Add show() method --- fg21sim/extragalactic/clusters/formation.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'fg21sim') 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 -- cgit v1.2.2