aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2019-02-27 20:38:16 +0800
committerAaron LI <aly@aaronly.me>2019-02-27 20:38:16 +0800
commit0ca5a652fbf4be4515fec92ca2face5f6d178270 (patch)
tree37169115ee48f03686bce0af9bb504186afa3939
parentd8143b2ba2de88bd76bfb4375fea2a8b77d3b31f (diff)
downloadfg21sim-0ca5a652fbf4be4515fec92ca2face5f6d178270.tar.bz2
clusters/main: Minor cleanups
-rw-r--r--fg21sim/extragalactic/clusters/main.py12
1 files changed, 5 insertions, 7 deletions
diff --git a/fg21sim/extragalactic/clusters/main.py b/fg21sim/extragalactic/clusters/main.py
index e26b07f..e031a8a 100644
--- a/fg21sim/extragalactic/clusters/main.py
+++ b/fg21sim/extragalactic/clusters/main.py
@@ -356,9 +356,9 @@ class GalaxyClusters:
def _calc_halos_emission(self):
"""
- Calculate the radio emissions at configured frequencies.
+ Calculate radio emissions at needed frequencies.
"""
- logger.info("Calculating the radio halo emissions ...")
+ logger.info("Calculating the emission of radio halos ...")
num = len(self.halos)
for i, hdict in enumerate(self.halos):
ii = i + 1
@@ -383,7 +383,6 @@ class GalaxyClusters:
em_fiducial = haloem.calc_emissivity(freq)
em_facc = em / em_fiducial
- # Update or add new items
hdict.update([
("frequency", freq), # [MHz]
("spec_index", index),
@@ -394,7 +393,7 @@ class GalaxyClusters:
("Tb_mean", Tb_mean), # [K]
])
- logger.info("Calculated the radio emissions.")
+ logger.info("Calculated halo emissions.")
def _dropout_halos(self):
"""
@@ -619,16 +618,15 @@ class GalaxyClusters:
The simulated sky image of radio halos as a new sky instance.
"""
freq = self.frequencies[freqidx]
- logger.info("Simulating radio halo map at %.2f [MHz] ..." % freq)
sky = self.sky.copy()
sky.frequency = freq
- # Conversion factor for [Jy/pixel] to [K]
JyPP2K = JyPerPix_to_K(freq, sky.pixelsize)
+ logger.info("Simulating radio halo map at %.2f [MHz] ..." % freq)
for hdict in self.halos:
if "template" not in hdict:
continue
- template = hdict["template"] # normalized to have mean of 1
+ template = hdict["template"] # normalized to mean of 1
Npix = template.size
flux = hdict["flux"][freqidx] # [Jy]
Tmean = (flux/Npix) * JyPP2K # [K]