dustem_plot_ext_deprecated.pro
2.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
PRO dustem_plot_ext_deprecated,st,st_model,_Extra=extra,help=help,UV=UV
;+
; NAME:
; dustem_plot_ext_deprecated
;
; PURPOSE:
; Plots a Dustem extinction
;
; CATEGORY:
; Dustem
;
; CALLING SEQUENCE:
; dustem_plot_ext,st,st_model[,/help][,_extra=]
;
; INPUTS:
; st = Dustem model output structure
; st_model = Dustem model parameters structure
;
; OPTIONAL INPUT PARAMETERS:
; _extra = extra parameters for the plot routine
;
; OUTPUTS:
; None
;
; OPTIONAL OUTPUT PARAMETERS:
; None
;
; ACCEPTED KEY-WORDS:
; help = If set, print this help
;
; COMMON BLOCKS:
; None
;
; SIDE EFFECTS:
; model is plotted
;
; RESTRICTIONS:
; The dustem idl wrapper must be installed
;
; PROCEDURE:
; None
;
; EXAMPLES
; dustem_init,/wrap
; dir_in=getenv('DUSTEM_SOFT_DIR')+'/src/dustem3.8_web/'
; st_model=dustem_read_all(dir_in)
; dir=getenv('DUSTEM_RES')
; st=dustem_read_all_res(dir_in)
; loadct,13
; dustem_plot_ext,st,st_model,yr=[1.e-6,1.e0],/ysty,xr=[1.,400],/xsty
;
; MODIFICATION HISTORY:
; Written by J.-Ph. Bernard
; Modified by VG with flags /UV,/IR
; 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_plot_ext_deprecated'
goto,the_end
ENDIF
message,'This routine is deprecated, see dustem_plot_ext ?'
; routine now stops/exits here
Ngrains=n_tags(st.sed)-2
colors=dustem_grains_colors(Ngrains)
;ytit=textoidl('extinction (cm^2/g)') & fact=1.
ytit=textoidl('\sigma_{ext} (1e-21 cm^2/H)') & mH=1.66e-24 & fact=mH*1.e21
tit='Dustem extinction'
;VG
if keyword_set(UV) then begin
xtit=textoidl('wave number (\mum^-1)')
xrange=1./st.ext.wav
plot,xrange,/nodata,_Extra=extra,xtit=xtit,ytit=ytit,tit=tit
endif else begin
xtit=textoidl('\lambda (\mum)')
xrange=st.ext.wav
plot_oo,xrange,/nodata,_Extra=extra,xtit=xtit,ytit=ytit,tit=tit
endelse
;VG
abs_tot=st.ext.abs_grain(0)*0.
sca_tot=st.ext.sca_grain(0)*0.
FOR i=0L,Ngrains-1 DO BEGIN
oplot,xrange,(st.ext.abs_grain(i)+st.ext.sca_grain(i))*fact,color=colors(i),psym=psym
; oplot,xrange,st.ext.abs_grain(i)*fact,color=colors(i-1),psym=psym
; oplot,xrange,st.ext.sca_grain(i)*fact,color=colors(i-1),psym=psym,linestyle=2
abs_tot=abs_tot+st.ext.abs_grain(i)*fact
sca_tot=sca_tot+st.ext.sca_grain(i)*fact
ENDFOR
oplot,xrange,(abs_tot+sca_tot),color=255,psym=psym
;oplot,xrange,abs_tot*fact,color=255,psym=psym
;oplot,xrange,sca_tot*fact,color=255,psym=psym,linestyle=2
defsysv,'!dustem_data',exists=exists
if exists then begin
if tag_exist(!dustem_data,'ext') then begin
if keyword_set(UV) then begin
oploterror,1./(*!dustem_data.ext).wav,(*!dustem_data.ext).values,(*!dustem_data.ext).wav*0.,(*!dustem_data.ext).sigma,psym=4
endif else begin
oploterror,(*!dustem_data.ext).wav,(*!dustem_data.ext).values,(*!dustem_data.ext).wav*0.,(*!dustem_data.ext).sigma,psym=4
endelse
endif
endif
the_end:
END