PRO dustem_plot_polext,st,p_dim,dustem_polext,aligned=aligned,win=win 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 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] fact=1E+01 Pext=st.polext.ext_tot*fact normpol1=dustem_polext*fact 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 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') IF keyword_set(ps) THEN BEGIN device,/close set_plot,'X' ENDIF END