Blame view

src/idl/dustem_plot_polext.pro 1.92 KB
dc72d0b6   Ilyes Choubani   initial procedure...
1
PRO dustem_plot_polext,st,p_dim,dustem_polext,aligned=aligned,win=win
759a527d   Ilyes Choubani   general update
2
3
4
5
6
7
8
9
10
11

IF keyword_set(ps) THEN BEGIN
    set_plot, 'PS'
    device, filename=ps, /color, /encapsulated
ENDIF ELSE BEGIN
  set_plot,'X'
    IF keyword_set(win) then window,win,title='DUSTEM WRAP (SERKOWSKI)'
ENDELSE


dc72d0b6   Ilyes Choubani   initial procedure...
12
13
14
15
16
17
18
titstq='Polarization Cross-section in extinction'
ytitstq=textoidl('\sigma_{pol} (cm^2/H) for N_H=10^{20} H/cm^2')
xtit=textoidl('\lambda^{-1} (\mum^{-1})')
xr=[1e-4,5.0]
yr=[1e-5,2.]
Ngrains=(*!dustem_params).Ngrains
Nwaves=(size(st.polext.ext_tot))[1]
759a527d   Ilyes Choubani   general update
19

dc72d0b6   Ilyes Choubani   initial procedure...
20
21
22
fact=1E+01
Pext=st.polext.ext_tot*fact
normpol1=dustem_polext*fact
759a527d   Ilyes Choubani   general update
23

dc72d0b6   Ilyes Choubani   initial procedure...
24
25
26
27
28
if not keyword_set(st) then begin
    ;activate the plugins here 
    st=dustem_run(p_dim)
    dustem_polext = dustem_compute_polext(p_dim,st,dustem_qext,dustem_uext,Q_ext,U_ext)
ENDIF
759a527d   Ilyes Choubani   general update
29

dc72d0b6   Ilyes Choubani   initial procedure...
30
31
32
33
34
35
36
37
38
39
40
ylog=1.
cgplot,1/st.polext.wav,Pext,xtit='',ytit=ytitstq,tit=titstq,ylog=ylog,/xlog,xr=xr,yr=yr,/ys,/xs,position=[0.17,0.35,0.93,0.93],xtickformat='(A1)',charsize=1.3
cgoplot,1/st.polext.wav,Pext,color='black'
cgoplot,1/(*!dustem_data.polext).wav,(*!dustem_data.polext).values*fact,color='Tomato',psym=16,symsize=1,thick=2
err_bar,1/(*!dustem_data.polext).wav,(*!dustem_data.polext).values*fact,yrms=3.*((*!dustem_data.polext).sigma)/2.*fact,color=cgColor('Tomato')
cgoplot,1/(*!dustem_data.polext).wav,dustem_polext*fact,psym=6,color='red',symsize=0;2

cgplot,1/st.polext.wav,Pext/Pext,xtit=xtit,ytit='Normalized',tit='',/xlog,xr=xr,/ys,/xs,yr=[0,2],ylog=0,position=[0.17,0.14,0.93,0.35],/noerase,yticks=2,ymino=5,xticklen=0.1,ytickformat='(F6.2)',charsize=1.3    
cgoplot,1/st.polext.wav,Pext/Pext,color='black'
cgoplot,1/(*!dustem_data.polext).wav,(*!dustem_data.polext).values*fact/normpol1,color='Tomato',psym=16,symsize=1,thick=2
err_bar,1/(*!dustem_data.polext).wav,(*!dustem_data.polext).values*fact/normpol1,yrms=3.*((*!dustem_data.polext).sigma)/2./normpol1*fact,color=cgColor('Tomato')
759a527d   Ilyes Choubani   general update
41
42
43
44
45
46
47
48
49
50
51
52


IF keyword_set(ps) THEN BEGIN
  device,/close
  set_plot,'X'
ENDIF





END