Commit 4002e6fa0da31873377e2759b077ad08409539de

Authored by Annie Hughes
1 parent 4f78d530
Exists in master

updated help

src/idl/dustem_habing_field.pro
1 1 FUNCTION DUSTEM_HABING_FIELD, x, unit=unit
  2 +
  3 +;+
  4 +; NAME:
  5 +; dustem_habing_field
  6 +;
  7 +; PURPOSE:
  8 +; Returns the Habing interstellar radiation field SED (ISRF)
  9 +; in W/m2 (4*!pi*nu*I_nu)
  10 +; (from Draine & Bertoldi 1996)
  11 +;
  12 +; CATEGORY:
  13 +; DustEMWrap, Distributed, LowLevel, Helper
  14 +;
  15 +; CALLING SEQUENCE:
  16 +; habing = DUSTEM_HABING_FIELD(x,unit=unit)
  17 +;
  18 +; INPUTS:
  19 +; x : wavelength grid for the ISRF (1D array)
  20 +;
  21 +; OPTIONAL INPUT PARAMETERS:
  22 +; UNIT: unit of the ISRF. Choices are
  23 +; 'W': wave in um [Default]
  24 +; 'F': frequency in cm-1
  25 +; 'E': energy in eV
  26 +;
  27 +; OUTPUTS:
  28 +; ISRF : the Habing isrf as 1d vector in requested units
  29 +;
  30 +; OPTIONAL OUTPUT PARAMETERS:
  31 +;
  32 +; ACCEPTED KEY-WORDS:
  33 +; help = print this help
  34 +;
  35 +; COMMON BLOCKS:
  36 +; None
  37 +;
  38 +; SIDE EFFECTS:
  39 +;
  40 +; RESTRICTIONS:
  41 +;
  42 +; PROCEDURES AND SUBROUTINES USED:
  43 +;
  44 +; EXAMPLES
  45 +; wavs=3.+findgen(3000) ; wavelenghts 3 to 3003um
  46 +; isrf = DUSTEM_HABING_FIELD(wavs,unit='W')
  47 +;
  48 +; MODIFICATION HISTORY:
  49 +; Written by LV 2009
  50 +; Initially distributed with the Fortran, incorporated into DustEMWrap 2022
  51 +; Evolution details on the DustEMWrap gitlab.
  52 +; See http://dustemwrap.irap.omp.eu/ for FAQ and help.
  53 +;-
  54 +
  55 + IF keyword_set(help) THEN BEGIN
  56 + doc_library,'dustem_habing_field'
  57 + field=0
  58 + goto,the_end
  59 + ENDIF
  60 +
  61 +
  62 +
2 63 ; computes the Habing interstellar radiation field SED (ISRF)
3 64 ; in W/m2 (4*!pi*nu*I_nu)
4 65 ; (from Draine & Bertoldi 1996)
... ... @@ -29,5 +90,6 @@ FUNCTION DUSTEM_HABING_FIELD, x, unit=unit
29 90 i_neg = where( field LT 0.d0, c_neg )
30 91 field( i_neg ) = 0.d0
31 92  
  93 + the_end:
32 94 RETURN, field
33 95 END ;FUNCTION DUSTEM_HABING_FIELD
... ...
src/idl/dustem_mathis_field.pro
1   -FUNCTION DUSTEM_MATHIS_FIELD, x, unit=unit
2   -; computes the Mathis interstellar radiation field SED (ISRF)
3   -; in W/m2 (4*!pi*nu*I_nu)
  1 +FUNCTION DUSTEM_MATHIS_FIELD, x, unit=unit, help=help
  2 +
  3 +;+
  4 +; NAME:
  5 +; dustem_mathis_field
  6 +;
  7 +; PURPOSE:
  8 +; Returns the Mathis interstellar radiation field SED (ISRF) in W/m2 (4*!pi*nu*I_nu)
4 9 ; from Mathis et al. 1983, A&A 128, 212
5   -; X (I): X-grid for the ISRF
6   -; UNIT (I): unit of the ISRF. Choices are
  10 +;
  11 +; CATEGORY:
  12 +; DustEMWrap, Distributed, LowLevel, Helper
  13 +;
  14 +; CALLING SEQUENCE:
  15 +; mathis = DUSTEM_MATHIS_FIELD(x,unit=unit)
  16 +;
  17 +; INPUTS:
  18 +; x : wavelength grid for the ISRF (1D array)
  19 +;
  20 +; OPTIONAL INPUT PARAMETERS:
  21 +; UNIT: unit of the ISRF. Choices are
7 22 ; 'W': wave in um [Default]
8 23 ; 'F': frequency in cm-1
9 24 ; 'E': energy in eV
  25 +;
  26 +; OUTPUTS:
  27 +; ISRF : the Mathis isrf as 1d vector in requested units
  28 +;
  29 +; OPTIONAL OUTPUT PARAMETERS:
  30 +;
  31 +; ACCEPTED KEY-WORDS:
  32 +; help = print this help
  33 +;
  34 +; COMMON BLOCKS:
  35 +; None
  36 +;
  37 +; SIDE EFFECTS:
  38 +;
  39 +; RESTRICTIONS:
  40 +;
  41 +; PROCEDURES AND SUBROUTINES USED:
  42 +;
  43 +; EXAMPLES
  44 +; wavs=3.+findgen(3000) ; wavelenghts 3 to 3003um
  45 +; isrf = DUSTEM_MATHIS_FIELD(wavs,unit='W')
  46 +;
  47 +; MODIFICATION HISTORY:
  48 +; Written by LV 2009
  49 +; Initially distributed with the Fortran, incorporated into DustEMWrap 2022
  50 +; Evolution details on the DustEMWrap gitlab.
  51 +; See http://dustemwrap.irap.omp.eu/ for FAQ and help.
  52 +;-
  53 +
  54 + IF keyword_set(help) THEN BEGIN
  55 + doc_library,'dustem_mathis_field'
  56 + field=0
  57 + goto,the_end
  58 + ENDIF
10 59  
11 60 if n_elements( UNIT ) EQ 0 then unit = 'W' $
12 61 else unit = strupcase( strcompress( unit,/rem) )
... ... @@ -47,6 +96,6 @@ FUNCTION DUSTEM_MATHIS_FIELD, x, unit=unit
47 96 il = where( x3 GE 1.34 AND x3 LT 2.46, cl )
48 97 if cl GT 0 then field(il) = 3.3105d-6 * x3(il)^(-0.6678)
49 98  
50   -
  99 +the_end:
51 100 RETURN, field
52 101 END ;FUNCTION DUSTEM_MATHIS_FIELD
... ...