From b888ec8a1abf602a4cc9237ff78babb131a2d008 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 8 Jan 2017 18:46:50 +0800 Subject: halo.py: Update to match MergerTree structures --- fg21sim/extragalactic/clusters/halo.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'fg21sim/extragalactic') diff --git a/fg21sim/extragalactic/clusters/halo.py b/fg21sim/extragalactic/clusters/halo.py index 6adfba5..8fd49c5 100644 --- a/fg21sim/extragalactic/clusters/halo.py +++ b/fg21sim/extragalactic/clusters/halo.py @@ -430,16 +430,16 @@ class HaloSingle: events = [] tree = self.mtree while tree: - if (tree.major and tree.minor and - tree.minor.node.mass >= self.merger_mass_th and - tree.major.node.z <= self.zmax): + if (tree.main and tree.sub and + tree.sub.data["mass"] >= self.merger_mass_th and + tree.main.data["z"] <= self.zmax): events.append({ - "M_main": tree.major.node.mass, - "M_sub": tree.minor.node.mass, - "z": tree.major.node.z, - "age": tree.major.node.age + "z": tree.main.data["z"], + "age": tree.main.data["age"], + "M_main": tree.main.data["mass"], + "M_sub": tree.sub.data["mass"], }) - tree = tree.major + tree = tree.main return events def _coef_acceleration(self, z): -- cgit v1.2.2