diff options
author | Aaron LI <aaronly.me@outlook.com> | 2017-01-08 18:46:50 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-06-01 16:33:39 +0800 |
commit | b888ec8a1abf602a4cc9237ff78babb131a2d008 (patch) | |
tree | 52369a6238e3da41dd1cc315019dbd979551d1e4 | |
parent | bd036531712dd4f7403e6f50205a836bac76c37f (diff) | |
download | fg21sim-b888ec8a1abf602a4cc9237ff78babb131a2d008.tar.bz2 |
halo.py: Update to match MergerTree structures
-rw-r--r-- | fg21sim/extragalactic/clusters/halo.py | 16 |
1 files changed, 8 insertions, 8 deletions
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): |