aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/extragalactic/pointsources/starforming.py
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-08-03 22:10:16 +0800
committerAaron LI <aly@aaronly.me>2017-08-03 22:10:16 +0800
commit7bcebf9daf5157ed249d162a75ff61d60fa98226 (patch)
tree613a3b563a0c58663dc1632d4b290295a45ae649 /fg21sim/extragalactic/pointsources/starforming.py
parentc6f861ee32233733b081209f4578450893816ee7 (diff)
downloadfg21sim-7bcebf9daf5157ed249d162a75ff61d60fa98226.tar.bz2
Update against "Fnu_to_Tb_fast()" unit changes
Signed-off-by: Aaron LI <aly@aaronly.me>
Diffstat (limited to 'fg21sim/extragalactic/pointsources/starforming.py')
-rw-r--r--fg21sim/extragalactic/pointsources/starforming.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/fg21sim/extragalactic/pointsources/starforming.py b/fg21sim/extragalactic/pointsources/starforming.py
index 5d518d8..a16d58d 100644
--- a/fg21sim/extragalactic/pointsources/starforming.py
+++ b/fg21sim/extragalactic/pointsources/starforming.py
@@ -208,8 +208,9 @@ class StarForming(BasePointSource):
Parameters
------------
- area: `~astropy.units.Quantity`
- Area of the PS, e.g., `1.0*au.sr2`
+ area: float
+ Area of the PS
+ Unit: [arcsec^2]
freq: `~astropy.units.Quantity`
Frequency, e.g., `1.0*au.MHz`
@@ -236,8 +237,6 @@ class StarForming(BasePointSource):
Parameters
------------
- area: `~astropy.units.Quantity`
- Area of the PS, e.g., `1.0*au.sr`
freq: `~astropy.units.Quantity`
Frequency, e.g., `1.0*au.MHz`
@@ -249,9 +248,11 @@ class StarForming(BasePointSource):
# Tb_list
num_ps = self.ps_catalog.shape[0]
Tb_list = np.zeros((num_ps,))
+ sr_to_arcsec2 = (np.rad2deg(1) * 3600) ** 2 # [sr] -> [arcsec^2]
# Iteratively calculate Tb
for i in range(num_ps):
ps_area = self.ps_catalog['Area (sr)'][i] # [sr]
- Tb_list[i] = self.calc_single_Tb(ps_area, freq)
+ area = ps_area * sr_to_arcsec2
+ Tb_list[i] = self.calc_single_Tb(area, freq)
return Tb_list