diff options
author | Aaron LI <aly@aaronly.me> | 2017-08-03 20:53:38 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-08-03 20:53:38 +0800 |
commit | 76f76d614e9f17bc6e431081a286e44ff915e786 (patch) | |
tree | 5e541a6573a38630eabeb52d150a316bd442c348 | |
parent | 03c40c824341eec36576d3aeb84adb90238d202d (diff) | |
download | fg21sim-76f76d614e9f17bc6e431081a286e44ff915e786.tar.bz2 |
utils/convert.py: Improve unit check and conversion
Signed-off-by: Aaron LI <aly@aaronly.me>
-rw-r--r-- | fg21sim/utils/convert.py | 4 |
1 files changed, 2 insertions, 2 deletions
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) |