diff options
author | Aaron LI <aly@aaronly.me> | 2017-08-13 21:03:45 +0800 |
---|---|---|
committer | Aaron LI <aly@aaronly.me> | 2017-08-13 21:03:45 +0800 |
commit | 4441d819c71258cdef74ad9ec97355e8a59c0c6f (patch) | |
tree | b392daea9680e1be9144159071b986de64585dd6 | |
parent | 1cab1c180cfc5465f1faf81d9fccb08a8684d4a7 (diff) | |
download | fg21sim-4441d819c71258cdef74ad9ec97355e8a59c0c6f.tar.bz2 |
utils/convert.py: Add function "JyPerPix_to_K()"
Signed-off-by: Aaron LI <aly@aaronly.me>
-rw-r--r-- | fg21sim/utils/convert.py | 17 |
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 |