diff options
author | Aaron LI <aly@aaronly.me> | 2019-01-30 16:39:17 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2019-01-30 17:12:52 +0800 |
commit | f84190254a39bf82953296b1fd97db2af59ed4a9 (patch) | |
tree | 7c92b7bd0cec2e1d9ced0843e6fb4ef11b8012cd /fg21sim/extragalactic | |
parent | b80a7157563063d833230cd3e88e0faf7e9bb03f (diff) | |
download | fg21sim-f84190254a39bf82953296b1fd97db2af59ed4a9.tar.bz2 |
clusters/main: Skip drawing ingenuine halos
Diffstat (limited to 'fg21sim/extragalactic')
-rw-r--r-- | fg21sim/extragalactic/clusters/main.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py index 4e2c1c3..29dfde8 100644 --- a/fg21sim/extragalactic/clusters/main.py +++ b/fg21sim/extragalactic/clusters/main.py @@ -433,7 +433,7 @@ class GalaxyClusters: The templates are normalized to have *mean* value of 1. """ idx_kept = [idx for idx, cdict in enumerate(self.halos) - if not cdict.get("drop", False)] + if cdit["genuine"] and not cdict.get("drop", False)] num = len(idx_kept) logger.info("Draw template images for %d halos ..." % num) for i, idx in enumerate(idx_kept): @@ -620,14 +620,14 @@ class GalaxyClusters: JyPP2K = JyPerPix_to_K(freq, sky.pixelsize) for hdict in self.halos: - if hdict.get("drop", False): + if "template" not in hdict: continue - center = (hdict["lon"], hdict["lat"]) template = hdict["template"] # normalized to have mean of 1 Npix = template.size flux = hdict["flux"][freqidx] # [Jy] Tmean = (flux/Npix) * JyPP2K # [K] Timg = Tmean * template # [K] + center = (hdict["lon"], hdict["lat"]) sky.add(Timg, center=center) logger.info("Done simulate map at %.2f [MHz]." % freq) |