From f84190254a39bf82953296b1fd97db2af59ed4a9 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Wed, 30 Jan 2019 16:39:17 +0800 Subject: clusters/main: Skip drawing ingenuine halos --- fg21sim/extragalactic/clusters/main.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'fg21sim/extragalactic/clusters/main.py') 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) -- cgit v1.2.2