From 76f76d614e9f17bc6e431081a286e44ff915e786 Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Thu, 3 Aug 2017 20:53:38 +0800 Subject: utils/convert.py: Improve unit check and conversion Signed-off-by: Aaron LI --- fg21sim/utils/convert.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'fg21sim') diff --git a/fg21sim/utils/convert.py b/fg21sim/utils/convert.py index fc9a228..02a4ffd 100644 --- a/fg21sim/utils/convert.py +++ b/fg21sim/utils/convert.py @@ -60,8 +60,8 @@ def Sb_to_Tb(Sb, freq): Tb : `~astropy.units.Quantity` Brightness temperature, with default unit `au.K` """ - omega = 1.0 * au.sr - Fnu = Sb * omega + omega = 1.0 * au.arcsec**2 + Fnu = (Sb * omega).to(au.Jy) # [Jy] return Fnu_to_Tb(Fnu, omega, freq) -- cgit v1.2.2