dustem_plot_extinction.pro
2.6 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
PRO dustem_plot_extinction,st,st_model,_Extra=extra,help=help
;+
; NAME:
; dustem_plot_extinction
; PURPOSE:
; Plots a Dustem extinction
; CATEGORY:
; Dustem
; CALLING SEQUENCE:
; dustem_plot_extinction,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_extinction,st,st_model,yr=[1.e-6,1.e0],/ysty,xr=[1.,400],/xsty
; MODIFICATION HISTORY:
; Written by J.-Ph. Bernard
; see evolution details on the dustem cvs maintained at CESR
; Contact J.-Ph. Bernard (Jean-Philippe.Bernard@cesr.fr) in case of problems.
;-
IF keyword_set(help) THEN BEGIN
doc_library,'dustem_plot_extinction'
goto,the_end
ENDIF
;stop
;Ngrains=n_tags(st.dustem)-2
Ngrains=st_model.Ngrains
colors=dustem_grains_colors(Ngrains)
;colmax=210 & colmin=30
;colors=findgen(Ngrains)/(1.*Ngrains-1)*(colmax-colmin)+colmin
xtit=textoidl('\lambda (\mum)')
;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'
;stop
i=0L
;plot_oo,st.ext.wav,st.ext.abs_grain(i)*fact,/nodata,_Extra=extra,xtit=xtit,ytit=ytit,tit=tit
ffact=fact*st_model.grains(i).MDUST_O_MH
plot_oo,st.ext.wav,(st.ext.abs_grain(i)+st.ext.sca_grain(i))*ffact,/nodata,_Extra=extra,xtit=xtit,ytit=ytit,tit=tit
abs_tot=st.ext.abs_grain(i)*0.
sca_tot=st.ext.sca_grain(i)*0.
FOR i=0L,Ngrains-1 DO BEGIN
ffact=fact*st_model.grains(i).MDUST_O_MH
oplot,st.ext.wav,(st.ext.abs_grain(i)+st.ext.sca_grain(i))*ffact,color=colors(i),psym=psym
; oplot,st.ext.wav,st.ext.abs_grain(i)*fact,color=colors(i-1),psym=psym
; oplot,st.ext.wav,st.ext.sca_grain(i)*fact,color=colors(i-1),psym=psym,linestyle=2
abs_tot=abs_tot+st.ext.abs_grain(i)*ffact
sca_tot=sca_tot+st.ext.sca_grain(i)*ffact
ENDFOR
oplot,st.ext.wav,(abs_tot+sca_tot),color=255,psym=psym
;oplot,st.dustem.wav,(abs_tot+sca_tot),color=255,psym=psym
;oplot,st.dustem.wav,abs_tot*fact,color=255,psym=psym
;oplot,st.dustem.wav,sca_tot*fact,color=255,psym=psym,linestyle=2
the_end:
END