diff options
author | Aaron LI <aly@aaronly.me> | 2017-08-03 22:10:16 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-08-03 22:10:16 +0800 |
commit | 7bcebf9daf5157ed249d162a75ff61d60fa98226 (patch) | |
tree | 613a3b563a0c58663dc1632d4b290295a45ae649 /fg21sim/extragalactic/pointsources/fr1.py | |
parent | c6f861ee32233733b081209f4578450893816ee7 (diff) | |
download | fg21sim-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/fr1.py')
-rw-r--r-- | fg21sim/extragalactic/pointsources/fr1.py | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/fg21sim/extragalactic/pointsources/fr1.py b/fg21sim/extragalactic/pointsources/fr1.py index 0e052cd..49969e0 100644 --- a/fg21sim/extragalactic/pointsources/fr1.py +++ b/fg21sim/extragalactic/pointsources/fr1.py @@ -283,8 +283,9 @@ class FRI(BasePointSource): Parameters ------------ - area: `~astropy.units.Quantity` - Area of the PS, e.g., `1.0*au.sr` + area: float + Area of the PS + Unit: [arcsec^2] freq: `~astropy.units.Quantity` Frequency, e.g., `1.0*au.MHz` @@ -318,7 +319,8 @@ class FRI(BasePointSource): flux_core = 10**lgs # [Jy] # core area npix = hp.nside2npix(self.nside) - core_area = 4 * np.pi / npix # [sr] + sr_to_arcsec2 = (np.rad2deg(1) * 3600) ** 2 # [sr] -> [arcsec^2] + core_area = 4 * np.pi / npix * sr_to_arcsec2 # [arcsec^2] Tb_core = convert.Fnu_to_Tb_fast(flux_core, core_area, freq) # [K] # lobe lumo_lobe = lumo_151 * (1 - ratio_obs) / (1 + ratio_obs) # [Jy] @@ -334,8 +336,6 @@ class FRI(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` @@ -347,9 +347,11 @@ class FRI(BasePointSource): # Tb_list num_ps = self.ps_catalog.shape[0] Tb_list = np.zeros((num_ps, 2)) + 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 |