Commit cff405d5f14195f219c07e6ff1dd802b29fb2b8e
1 parent
261aca53
Exists in
master
improved header and doc help
Showing
1 changed file
with
12 additions
and
2 deletions
Show diff stats
src/idl/dustem_planck_function.pro
1 | -function dustem_planck_function,temp,wave | 1 | +function dustem_planck_function,temp,wave,help=help |
2 | 2 | ||
3 | ;+ | 3 | ;+ |
4 | ; NAME: | 4 | ; NAME: |
@@ -20,6 +20,9 @@ function dustem_planck_function,temp,wave | @@ -20,6 +20,9 @@ function dustem_planck_function,temp,wave | ||
20 | ; OUTPUT: | 20 | ; OUTPUT: |
21 | ; BBFLUX - Scalar or vector giving the Planck function at the specified | 21 | ; BBFLUX - Scalar or vector giving the Planck function at the specified |
22 | ; wavelength points. | 22 | ; wavelength points. |
23 | +; ACCEPTED KEYWORDS | ||
24 | +; help = If set, print this help | ||
25 | +; | ||
23 | ; COMMON BLOCKS: | 26 | ; COMMON BLOCKS: |
24 | ; None | 27 | ; None |
25 | ; | 28 | ; |
@@ -37,7 +40,13 @@ function dustem_planck_function,temp,wave | @@ -37,7 +40,13 @@ function dustem_planck_function,temp,wave | ||
37 | ; See http://dustemwrap.irap.omp.eu/ for FAQ and help. | 40 | ; See http://dustemwrap.irap.omp.eu/ for FAQ and help. |
38 | ;- | 41 | ;- |
39 | 42 | ||
40 | - On_error,2 | 43 | +; On_error,2 |
44 | + | ||
45 | + IF keyword_set(help) THEN BEGIN | ||
46 | + doc_library,'dustem_planck_function' | ||
47 | + bbflux=-1. | ||
48 | + goto,the_end | ||
49 | +ENDIF | ||
41 | 50 | ||
42 | if ( N_elements(wave) LT 1 ) then begin | 51 | if ( N_elements(wave) LT 1 ) then begin |
43 | print,'Syntax - bbflux = dustem_planck_function(temp,wave)' | 52 | print,'Syntax - bbflux = dustem_planck_function(temp,wave)' |
@@ -68,6 +77,7 @@ function dustem_planck_function,temp,wave | @@ -68,6 +77,7 @@ function dustem_planck_function,temp,wave | ||
68 | fact=1.06177e+06 | 77 | fact=1.06177e+06 |
69 | bbflux=bbflux*w*w*fact ;MJy/sr | 78 | bbflux=bbflux*w*w*fact ;MJy/sr |
70 | 79 | ||
80 | +the_end: | ||
71 | ; return, bbflux*1.E-8 ; Convert to ergs/cm2/s/A | 81 | ; return, bbflux*1.E-8 ; Convert to ergs/cm2/s/A |
72 | RETURN,bbflux | 82 | RETURN,bbflux |
73 | 83 |