diff --git a/src/idl/dustem_habing_field.pro b/src/idl/dustem_habing_field.pro index 00543b8..77feff3 100644 --- a/src/idl/dustem_habing_field.pro +++ b/src/idl/dustem_habing_field.pro @@ -1,4 +1,65 @@ FUNCTION DUSTEM_HABING_FIELD, x, unit=unit + +;+ +; NAME: +; dustem_habing_field +; +; PURPOSE: +; Returns the Habing interstellar radiation field SED (ISRF) +; in W/m2 (4*!pi*nu*I_nu) +; (from Draine & Bertoldi 1996) +; +; CATEGORY: +; DustEMWrap, Distributed, LowLevel, Helper +; +; CALLING SEQUENCE: +; habing = DUSTEM_HABING_FIELD(x,unit=unit) +; +; INPUTS: +; x : wavelength grid for the ISRF (1D array) +; +; OPTIONAL INPUT PARAMETERS: +; UNIT: unit of the ISRF. Choices are +; 'W': wave in um [Default] +; 'F': frequency in cm-1 +; 'E': energy in eV +; +; OUTPUTS: +; ISRF : the Habing isrf as 1d vector in requested units +; +; OPTIONAL OUTPUT PARAMETERS: +; +; ACCEPTED KEY-WORDS: +; help = print this help +; +; COMMON BLOCKS: +; None +; +; SIDE EFFECTS: +; +; RESTRICTIONS: +; +; PROCEDURES AND SUBROUTINES USED: +; +; EXAMPLES +; wavs=3.+findgen(3000) ; wavelenghts 3 to 3003um +; isrf = DUSTEM_HABING_FIELD(wavs,unit='W') +; +; MODIFICATION HISTORY: +; Written by LV 2009 +; Initially distributed with the Fortran, incorporated into DustEMWrap 2022 +; Evolution details on the DustEMWrap gitlab. +; See http://dustemwrap.irap.omp.eu/ for FAQ and help. +;- + + IF keyword_set(help) THEN BEGIN + doc_library,'dustem_habing_field' + field=0 + goto,the_end + ENDIF + + + ; computes the Habing interstellar radiation field SED (ISRF) ; in W/m2 (4*!pi*nu*I_nu) ; (from Draine & Bertoldi 1996) @@ -29,5 +90,6 @@ FUNCTION DUSTEM_HABING_FIELD, x, unit=unit i_neg = where( field LT 0.d0, c_neg ) field( i_neg ) = 0.d0 + the_end: RETURN, field END ;FUNCTION DUSTEM_HABING_FIELD diff --git a/src/idl/dustem_mathis_field.pro b/src/idl/dustem_mathis_field.pro index b488d0f..a6ea16d 100644 --- a/src/idl/dustem_mathis_field.pro +++ b/src/idl/dustem_mathis_field.pro @@ -1,12 +1,61 @@ -FUNCTION DUSTEM_MATHIS_FIELD, x, unit=unit -; computes the Mathis interstellar radiation field SED (ISRF) -; in W/m2 (4*!pi*nu*I_nu) +FUNCTION DUSTEM_MATHIS_FIELD, x, unit=unit, help=help + +;+ +; NAME: +; dustem_mathis_field +; +; PURPOSE: +; Returns the Mathis interstellar radiation field SED (ISRF) in W/m2 (4*!pi*nu*I_nu) ; from Mathis et al. 1983, A&A 128, 212 -; X (I): X-grid for the ISRF -; UNIT (I): unit of the ISRF. Choices are +; +; CATEGORY: +; DustEMWrap, Distributed, LowLevel, Helper +; +; CALLING SEQUENCE: +; mathis = DUSTEM_MATHIS_FIELD(x,unit=unit) +; +; INPUTS: +; x : wavelength grid for the ISRF (1D array) +; +; OPTIONAL INPUT PARAMETERS: +; UNIT: unit of the ISRF. Choices are ; 'W': wave in um [Default] ; 'F': frequency in cm-1 ; 'E': energy in eV +; +; OUTPUTS: +; ISRF : the Mathis isrf as 1d vector in requested units +; +; OPTIONAL OUTPUT PARAMETERS: +; +; ACCEPTED KEY-WORDS: +; help = print this help +; +; COMMON BLOCKS: +; None +; +; SIDE EFFECTS: +; +; RESTRICTIONS: +; +; PROCEDURES AND SUBROUTINES USED: +; +; EXAMPLES +; wavs=3.+findgen(3000) ; wavelenghts 3 to 3003um +; isrf = DUSTEM_MATHIS_FIELD(wavs,unit='W') +; +; MODIFICATION HISTORY: +; Written by LV 2009 +; Initially distributed with the Fortran, incorporated into DustEMWrap 2022 +; Evolution details on the DustEMWrap gitlab. +; See http://dustemwrap.irap.omp.eu/ for FAQ and help. +;- + + IF keyword_set(help) THEN BEGIN + doc_library,'dustem_mathis_field' + field=0 + goto,the_end + ENDIF if n_elements( UNIT ) EQ 0 then unit = 'W' $ else unit = strupcase( strcompress( unit,/rem) ) @@ -47,6 +96,6 @@ FUNCTION DUSTEM_MATHIS_FIELD, x, unit=unit il = where( x3 GE 1.34 AND x3 LT 2.46, cl ) if cl GT 0 then field(il) = 3.3105d-6 * x3(il)^(-0.6678) - +the_end: RETURN, field END ;FUNCTION DUSTEM_MATHIS_FIELD -- libgit2 0.21.2