Commit c20141617417f0e37ca468ccf0517a1dfef82b27
1 parent
a9404b26
Exists in
master
updated help
Showing
1 changed file
with
89 additions
and
28 deletions
Show diff stats
src/idl/dustem_create_rfield.pro
1 | 1 | FUNCTION DUSTEM_CREATE_RFIELD, temp, x=x, isrf=isrf, wdil=wdil, wcut=wcut, g0=g0, chi=chi, fname=fname, help=help |
2 | 2 | |
3 | +;+ | |
4 | +; NAME: | |
5 | +; dustem_create_rfield | |
6 | +; | |
7 | +; PURPOSE: | |
8 | +; generates a file with the radiation field in format suitable for | |
9 | +; DUSTEM (ISRF.DAT). Units erg/cm2/s/Hz (4*!pi*I_nu) | |
10 | +; RFIELD = ISRF + WDIL*PI*BB(TEMP) ' | |
11 | +; | |
12 | +; CATEGORY: | |
13 | +; DustEMWrap, Distributed, LowLevel, Helper | |
14 | +; | |
15 | +; CALLING SEQUENCE: | |
16 | +; mathis = DUSTEM_MATHIS_FIELD(x,unit=unit) | |
17 | +; | |
18 | +; INPUTS: | |
19 | +; TEMP -- blackbody temperature (can be an array). If 0 only ISRF. | |
20 | +; | |
21 | +; OPTIONAL INPUT PARAMETERS: | |
22 | +; X -- wavelength -grid for the ISRF in microns. Default is 200 pts over 0.01-10^5 microns. | |
23 | +; (including WCUT point). You want to include WCUT for accurate edges. | |
24 | +; ISRF -- if set to 0 no ISRF is added, 1 is Mathis (default), 2 is Habing | |
25 | +; WDIL -- blackbody dilution factor (can be an array) | |
26 | +; FNAME -- filename for ISRF.DAT | |
27 | +; WCUT --- for wave < wcut radiation field is 0 | |
28 | +; | |
29 | +; OUTPUTS: | |
30 | +; | |
31 | +; OPTIONAL OUTPUT PARAMETERS: | |
32 | +; G0 -- factor flux(6-13.6eV) wrt. Mathis field | |
33 | +; CHI -- scaling factor at 100nm wrt. Mathis field | |
34 | +; | |
35 | +; ACCEPTED KEY-WORDS: | |
36 | +; help = print this help | |
37 | +; | |
38 | +; COMMON BLOCKS: | |
39 | +; None | |
40 | +; | |
41 | +; SIDE EFFECTS: | |
42 | +; | |
43 | +; RESTRICTIONS: | |
44 | +; | |
45 | +; PROCEDURES AND SUBROUTINES USED: | |
46 | +; | |
47 | +; EXAMPLES | |
48 | +; tt = dustem_create_rfield([2d4,5d4],wdil=[1.d-14,1.d-16],x=x,fname='ISRF.DAT') | |
49 | +; | |
50 | +; MODIFICATION HISTORY: | |
51 | +; Written by LV 2009 | |
52 | +; Initially distributed with the Fortran, incorporated into DustEMWrap 2022 | |
53 | +; Evolution details on the DustEMWrap gitlab. | |
54 | +; See http://dustemwrap.irap.omp.eu/ for FAQ and help. | |
55 | +;- | |
56 | + | |
57 | + | |
3 | 58 | if N_PARAMS() LT 1 or keyword_set(help) then begin |
4 | - print,'------------------------------------------------------------------------------------------------------' | |
5 | - print,'FUNCTION DUSTEM_CREATE_RFIELD, temp, x=x, isrf=isrf, wdil=wdil, wcut=wcut, g0=g0, chi=chi, fname=fname' | |
6 | - print,'------------------------------------------------------------------------------------------------------' | |
7 | - print,'' | |
8 | - print,' generates the radiation field for DUSTEM (ISRF.DAT)' | |
9 | - print,' in erg/cm2/s/Hz (4*!pi*I_nu)' | |
10 | - print,' RFIELD = ISRF + WDIL*PI*BB(TEMP) ' | |
11 | - print,' ISRF from Mathis et al. 1983, A&A 128, 212' | |
12 | - print,' NB: if blackbody is isotropic set WDIL to 4 (to get 4*!pi factor)' | |
13 | - print,'' | |
14 | - print,' TEMP (I): blackbody temperature (can be an array). If 0 only ISRF.' | |
15 | - print,' X (I): X-grid for the ISRF in microns. Default is 200 pts over 0.01-10^5 microns.' | |
16 | - print,' (including WCUT point). You want to include WCUT for accurate edges.' | |
17 | - print,' ISRF (I): if set to 0 no ISRF is added, 1 is Mathis (default), 2 is Habing' | |
18 | - print,' WDIL (I): blackbody dilution factor (can be an array)' | |
19 | - print,' FNAME(I): filename for ISRF.DAT' | |
20 | - print,' WCUT (I): for wave < wcut radiation field is 0 ' | |
21 | - print,' G0 (O): factor flux(6-13.6eV) wrt. Mathis field ' | |
22 | - print,' CHI (O): scaling factor at 100nm wrt. Mathis field' | |
23 | - print,'' | |
24 | - print,'Example: tt = dustem_create_rfield([2d4,5d4],wdil=[1.d-14,1.d-16],x=x,fname=''ISRF.DAT'')' | |
25 | - print,'' | |
26 | - print,' Created Aug. 2009, L. Verstraete, IAS' | |
27 | - print,' Force the WCUT point, May 2011, LV' | |
28 | - print,'' | |
29 | - print,'------------------------------------------------------------------------------------------------------' | |
30 | - RETURN,0 | |
31 | - endif | |
59 | + doc_library,'dustem_create_rfield' | |
60 | + rfield=0 | |
61 | + goto, the_end | |
62 | + end | |
63 | + | |
64 | + ;; print,'------------------------------------------------------------------------------------------------------' | |
65 | + ;; print,'FUNCTION DUSTEM_CREATE_RFIELD, temp, x=x, isrf=isrf, wdil=wdil, wcut=wcut, g0=g0, chi=chi, fname=fname' | |
66 | + ;; print,'------------------------------------------------------------------------------------------------------' | |
67 | + ;; print,'' | |
68 | + ;; print,' generates the radiation field for DUSTEM (ISRF.DAT)' | |
69 | + ;; print,' in erg/cm2/s/Hz (4*!pi*I_nu)' | |
70 | + ;; print,' RFIELD = ISRF + WDIL*PI*BB(TEMP) ' | |
71 | + ;; print,' ISRF from Mathis et al. 1983, A&A 128, 212' | |
72 | + ;; print,' NB: if blackbody is isotropic set WDIL to 4 (to get 4*!pi factor)' | |
73 | + ;; print,'' | |
74 | + ;; print,' TEMP (I): blackbody temperature (can be an array). If 0 only ISRF.' | |
75 | + ;; print,' X (I): X-grid for the ISRF in microns. Default is 200 pts over 0.01-10^5 microns.' | |
76 | + ;; print,' (including WCUT point). You want to include WCUT for accurate edges.' | |
77 | + ;; print,' ISRF (I): if set to 0 no ISRF is added, 1 is Mathis (default), 2 is Habing' | |
78 | + ;; print,' WDIL (I): blackbody dilution factor (can be an array)' | |
79 | + ;; print,' FNAME(I): filename for ISRF.DAT' | |
80 | + ;; print,' WCUT (I): for wave < wcut radiation field is 0 ' | |
81 | + ;; print,' G0 (O): factor flux(6-13.6eV) wrt. Mathis field ' | |
82 | + ;; print,' CHI (O): scaling factor at 100nm wrt. Mathis field' | |
83 | + ;; print,'' | |
84 | + ;; print,'Example: tt = dustem_create_rfield([2d4,5d4],wdil=[1.d-14,1.d-16],x=x,fname=''ISRF.DAT'')' | |
85 | + ;; print,'' | |
86 | + ;; print,' Created Aug. 2009, L. Verstraete, IAS' | |
87 | + ;; print,' Force the WCUT point, May 2011, LV' | |
88 | + ;; print,'' | |
89 | + ;; print,'------------------------------------------------------------------------------------------------------' | |
90 | + ;; RETURN,0 | |
91 | + ;; endif | |
32 | 92 | |
33 | 93 | ; inits |
34 | 94 | unit='W' |
... | ... | @@ -143,5 +203,6 @@ FUNCTION DUSTEM_CREATE_RFIELD, temp, x=x, isrf=isrf, wdil=wdil, wcut=wcut, g0=g0 |
143 | 203 | print,'(W) DUSTEM_CREATE_RFIELD: radiation field written in ', strtrim(fname,2) |
144 | 204 | ENDIF |
145 | 205 | |
206 | + the_end: | |
146 | 207 | RETURN, RFIELD |
147 | 208 | END | ... | ... |