diff --git a/src/idl_misc/JPBLib_for_Dustemwrap/General/convert_mk_mjy.pro b/src/idl_misc/JPBLib_for_Dustemwrap/General/convert_mk_mjy.pro new file mode 100644 index 0000000..2afc848 --- /dev/null +++ b/src/idl_misc/JPBLib_for_Dustemwrap/General/convert_mk_mjy.pro @@ -0,0 +1,45 @@ +; Copyright 2007 IAS + +; This file is part of the Planck Sky Model. +; +; The Planck Sky Model is free software; you can redistribute it and/or modify +; it under the terms of the GNU General Public License as published by +; the Free Software Foundation; version 2 of the License. +; +; The Planck Sky Model is distributed in the hope that it will be useful, +; but WITHOUT ANY WARRANTY, without even the implied warranty of +; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +; GNU General Public License for more details. +; +; You should have received a copy of the GNU General Public License +; along with the Planck Sky Model. If not, write to the Free Software +; Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +;+ +; Convert mK, either themodynamic or Rayleigh-Jeans in MJy/sr +; +; +; @param lam {in}{required}{type=float} wavelength in micron +; @keyword sig_mK{in}{required}{type=float} signal in mK +; @keyword sig_Mjy{in}{optional}{type=float} ... +; @keyword RJ{in}{optional}{type=boolean} ... +; @keyword CMB_TH{in}{optional}{type=boolean} ... +; +; @history
Written Guilaine Lagache, 2001
+;- + +pro convert_mk_mjy, lam, sig_mk, sig_Mjy, RJ=RJ, CMB_TH = CMB_TH +k=1.3806503e-23 + +IF KEYWORD_SET(RJ) THEN $ + ; mK Rayleigh-Jeans + sig_Mjy=sig_mk*1.e-3*2*k*1e20/(lam*1.e-6)^2. + +IF KEYWORD_SET(CMB_TH) THEN BEGIN + ; mK thermodynamique + PLANCK_VALUES= planck_function(2.726,lam,dBdT_VALUES,units='micron',/MJY) + sig_Mjy=sig_mk*dbdt_values*1.e-3 +ENDIF + +END + -- libgit2 0.21.2