From 778f55453988546c7e4a9bb13b9eae600bb73b06 Mon Sep 17 00:00:00 2001 From: "Kelley M. Hess" Date: Thu, 6 Jun 2024 11:00:37 +0200 Subject: [PATCH] If non-HI, mom0 contours in Jy/beam Hz. #1 --- src/modules/functions.py | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/modules/functions.py b/src/modules/functions.py index 8630640..c8830e6 100644 --- a/src/modules/functions.py +++ b/src/modules/functions.py @@ -123,7 +123,10 @@ def sbr2nhi(sbr, bunit, bmaj, bmin, source, spec_line=None): if (spec_line == None) or (spec_line == 'HI'): nhi = 2.330e+20 * (1 + z) ** 4 * sbr / bmaj / bmin else: - nhi = 1.222e+3 * sbr / bmaj / bmin / line['restfreq'].to(u.GHz).value**2 + # Units of Jy/beam Hz + nhi = sbr + # Units of Kelvin Hz + # nhi = 1.222e+3 * sbr / bmaj / bmin / line['restfreq'].to(u.GHz).value**2 else: if (spec_line == None) or (spec_line == 'HI'): @@ -141,8 +144,8 @@ def sbr2nhi(sbr, bunit, bmaj, bmin, source, spec_line=None): nhi_label = '$N_\mathrm{{HI}}$ = {0:.1f} x $10^{{ {1:d} }}$ cm$^{{-2}}$'.format(nhi/10**nhi_ofm, nhi_ofm) nhi_labels = '$N_\mathrm{{HI}}$ = $2^n$ x {0:.1f} x $10^{{ {1:d} }}$ cm$^{{-2}}$ ($n$=0,1,...)'.format(nhi/10**nhi_ofm, nhi_ofm) else: - nhi_label = '$S_\mathrm{{{0:s}}}$ = {1:.1f} x $10^{{ {2:d} }}$ K Hz'.format(line['name'], nhi/10**nhi_ofm, nhi_ofm) - nhi_labels = '$S_\mathrm{{{:s}}}$ = $2^n$ x {:.1f} x $10^{{ {:d} }}$ K Hz ($n$=0,1,...)'.format(line['name'], + nhi_label = '$S_\mathrm{{{0:s}}}$ = {1:.1f} x $10^{{ {2:d} }}$ Jy/beam Hz'.format(line['name'], nhi/10**nhi_ofm, nhi_ofm) + nhi_labels = '$S_\mathrm{{{:s}}}$ = $2^n$ x {:.1f} x $10^{{ {:d} }}$ Jy/beam Hz ($n$=0,1,...)'.format(line['name'], nhi/10**nhi_ofm, nhi_ofm) return nhi, nhi_label, nhi_labels