diff options
-rw-r--r-- | fg21sim/extragalactic/clusters/helper.py | 14 | ||||
-rw-r--r-- | fg21sim/extragalactic/clusters/main.py | 2 |
2 files changed, 12 insertions, 4 deletions
diff --git a/fg21sim/extragalactic/clusters/helper.py b/fg21sim/extragalactic/clusters/helper.py index becb608..26146cc 100644 --- a/fg21sim/extragalactic/clusters/helper.py +++ b/fg21sim/extragalactic/clusters/helper.py @@ -449,15 +449,23 @@ def draw_halo(rprofile, felong, rotation=0.0): Parameters ---------- - rprofile + rprofile : 1D `~numpy.ndarray` + The values along the radial pixels (0, 1, 2, ...), + e.g., calculated by the above ``halo_rprofile()``. + felong : float + The elongated fraction of the elliptical halo, which is + defined as the ratio of semi-minor axis to the semi-major axis. + rotation : float + The rotation angle of the elliptical halo. + Unit: [deg] Returns ------- image : 2D `~numpy.ndarray` 2D array of the drawn halo template image. - The image is normalized to have sum of 1. + The image is normalized to have *mean* value of 1. """ image = circle(rprofile=rprofile) image = circle2ellipse(image, bfraction=felong, rotation=rotation) - image /= image.sum() + image /= image.mean() return image diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py index 15a9dcd..94a3288 100644 --- a/fg21sim/extragalactic/clusters/main.py +++ b/fg21sim/extragalactic/clusters/main.py @@ -304,7 +304,7 @@ class GalaxyClusters: ---- The drawn template images are append to the dictionaries of the corresponding halo within the ``self.halos``. - The templates are normalized to have sum of 1. + The templates are normalized to have *mean* value of 1. """ num = len(self.halos) logger.info("Draw template images for %d halos ..." % num) |