diff options
Diffstat (limited to 'fg21sim')
-rw-r--r-- | fg21sim/configs/20-extragalactic.conf.spec | 7 | ||||
-rw-r--r-- | fg21sim/extragalactic/clusters/main.py | 6 |
2 files changed, 10 insertions, 3 deletions
diff --git a/fg21sim/configs/20-extragalactic.conf.spec b/fg21sim/configs/20-extragalactic.conf.spec index dbebe4e..6e023e5 100644 --- a/fg21sim/configs/20-extragalactic.conf.spec +++ b/fg21sim/configs/20-extragalactic.conf.spec @@ -113,6 +113,13 @@ # WARNING: for testing usage. boost = float(default=1.0, min=0.1, max=1e4) + # Minimal elongated fraction for creating the images of radio halos + # The ``felong`` is defined as ``felong = b/a``, similar to the Hubble + # classification for the elliptical galaxies. ``felong_min = 1.0`` + # means no elongation, and ``felong_min = 0.6`` is a good choice as + # the observed radio halos are generally regular. + felong_min = float(default=1.0, min=0.1, max=1.0) + # Number of most powerful halos to be dropped out. halo_dropout = integer(default=0, min=0) diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py index 1c3f8e7..0af41ab 100644 --- a/fg21sim/extragalactic/clusters/main.py +++ b/fg21sim/extragalactic/clusters/main.py @@ -82,6 +82,7 @@ class GalaxyClusters: self.dump_halos_data = configs.getn(comp+"/dump_halos_data") self.use_dump_halos_data = configs.getn( comp+"/use_dump_halos_data") + self.felong_min = configs.getn(comp+"/felong_min") self.halo_dropout = configs.getn(comp+"/halo_dropout") self.prefix = configs.getn(comp+"/prefix") self.output_dir = configs.get_path(comp+"/output_dir") @@ -154,10 +155,9 @@ class GalaxyClusters: logger.info("Preliminary processes to the catalog ...") num = len(self.catalog) lon, lat = self.sky.random_points(n=num) - felong_min = 0.6 - sigma = (1.0 - felong_min) / 3.0 + sigma = (1.0 - self.felong_min) / 3.0 felong = 1.0 - np.abs(np.random.normal(scale=sigma, size=num)) - felong[felong < felong_min] = felong_min + felong[felong < self.felong_min] = self.felong_min rotation = np.random.uniform(low=0.0, high=360.0, size=num) for i, cdict in enumerate(self.catalog): |