aboutsummaryrefslogtreecommitdiffstats
path: root/fg21sim/utils
diff options
context:
space:
mode:
authorAaron LI <aly@aaronly.me>2017-08-13 21:03:45 +0800
committerAaron LI <aly@aaronly.me>2017-08-13 21:03:45 +0800
commit4441d819c71258cdef74ad9ec97355e8a59c0c6f (patch)
treeb392daea9680e1be9144159071b986de64585dd6 /fg21sim/utils
parent1cab1c180cfc5465f1faf81d9fccb08a8684d4a7 (diff)
downloadfg21sim-4441d819c71258cdef74ad9ec97355e8a59c0c6f.tar.bz2
utils/convert.py: Add function "JyPerPix_to_K()"
Signed-off-by: Aaron LI <aly@aaronly.me>
Diffstat (limited to 'fg21sim/utils')
-rw-r--r--fg21sim/utils/convert.py17
1 files changed, 17 insertions, 0 deletions
diff --git a/fg21sim/utils/convert.py b/fg21sim/utils/convert.py
index c36d5fc..d238339 100644
--- a/fg21sim/utils/convert.py
+++ b/fg21sim/utils/convert.py
@@ -137,3 +137,20 @@ def Fnu_to_Tb_fast(Fnu, omega, freq):
"""
Sb = Fnu / omega # [Jy/arcsec^2]
return Sb_to_Tb_fast(Sb, freq)
+
+
+def JyPerPix_to_K(freq, pixelsize):
+ """
+ The factor that converts [Jy/pixel] to [K] (brightness temperature).
+
+ Parameters
+ ----------
+ freq : float
+ The frequency where the flux density measured.
+ Unit: [Jy]
+ pixelsize : float
+ The pixel size.
+ Unit: [arcsec]
+ """
+ factor = Fnu_to_Tb_fast(Fnu=1.0, omega=pixelsize**2, freq=freq)
+ return factor