From d478099bddf5748c643fe013f8363484c3d88e74 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Thu, 20 Jul 2017 09:21:26 +0800 Subject: mergertree/show_mergertree(): Improve print format Signed-off-by: Aaron LI --- fg21sim/extragalactic/clusters/mergertree.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/fg21sim/extragalactic/clusters/mergertree.py b/fg21sim/extragalactic/clusters/mergertree.py index 3ea6165..20fc3ff 100644 --- a/fg21sim/extragalactic/clusters/mergertree.py +++ b/fg21sim/extragalactic/clusters/mergertree.py @@ -80,15 +80,15 @@ def show_mtree(mtree): info = "[z=%.3f/t=%.2f]" % (z, age) if sub is None: # Accretion - info += " %.5g" % mass + info += " %.3e" % mass if parent is not None: dM = parent.data["mass"] - mass - info += " (dM=%.5g)" % dM + info += " (dM=%.2e)" % dM else: # Merger Msub = sub.data["mass"] Rmass = mass / Msub - info += " %.5g <> %.5g (Rm=%.1f)" % (mass, Msub, Rmass) + info += " %.3e <> %.3e (Rm=%.1f)" % (mass, Msub, Rmass) return info i = 0 -- cgit v1.2.2