aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2018-01-03 22:24:06 +0800
committerAaron LI <aly@aaronly.me>2018-01-03 22:24:06 +0800
commitb210982eb93a5c783819f2ad7a8758a9ff200894 (patch)
tree0c43d69109e1ba7030c2c19007f680e6a67307f7
parentb6a5e6d320368c835d56e888147d5fed6ecd5b29 (diff)
downloadfg21sim-b210982eb93a5c783819f2ad7a8758a9ff200894.tar.bz2
clusters: Fix catalog data to CSV save
-rw-r--r--fg21sim/extragalactic/clusters/main.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py
index a29c474..6442e2a 100644
--- a/fg21sim/extragalactic/clusters/main.py
+++ b/fg21sim/extragalactic/clusters/main.py
@@ -394,7 +394,9 @@ class GalaxyClusters:
# Pad the merger events to be same length
nmax = max([cdict["merger_num"] for cdict in self.catalog])
for cdict in self.catalog:
- num = cdict["merger_num"]
+ num = len(cdict["merger_z"])
+ if num == nmax:
+ continue
cdict.update([
("merger_mass1", cdict["merger_mass1"] + [None]*(nmax-num)),
("merger_mass2", cdict["merger_mass2"] + [None]*(nmax-num)),