From 4441d819c71258cdef74ad9ec97355e8a59c0c6f Mon Sep 17 00:00:00 2001 From: Aaron LI Date: Sun, 13 Aug 2017 21:03:45 +0800 Subject: utils/convert.py: Add function "JyPerPix_to_K()" Signed-off-by: Aaron LI --- fg21sim/utils/convert.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) 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 -- cgit v1.2.2