Commit 12cc30cc10aa875f79fd8695ebbe3944afa9c3a7
Exists in
master
Merge branch 'master' of https://gitlab.irap.omp.eu/OV-GSO-DC/dustem-wrapper_idl
Showing
4 changed files
with
21 additions
and
11 deletions
Show diff stats
src/idl/dustem_fit_sed_readme.pro
@@ -60,6 +60,9 @@ PRO dustem_fit_sed_readme,postcript=postcript,model=model,help=help,png=png,iter | @@ -60,6 +60,9 @@ PRO dustem_fit_sed_readme,postcript=postcript,model=model,help=help,png=png,iter | ||
60 | ; Contact J.-Ph. Bernard (Jean-Philippe.Bernard@cesr.fr) in case of problems. | 60 | ; Contact J.-Ph. Bernard (Jean-Philippe.Bernard@cesr.fr) in case of problems. |
61 | ;- | 61 | ;- |
62 | 62 | ||
63 | + | ||
64 | + | ||
65 | + | ||
63 | IF keyword_set(help) THEN BEGIN | 66 | IF keyword_set(help) THEN BEGIN |
64 | doc_library,'dustem_fit_sed_readme' | 67 | doc_library,'dustem_fit_sed_readme' |
65 | goto,the_end | 68 | goto,the_end |
src/idl/dustem_initialize_sed.pro
@@ -68,8 +68,7 @@ comments=['Dustem-Wrap SED'] | @@ -68,8 +68,7 @@ comments=['Dustem-Wrap SED'] | ||
68 | comments=[comments,'instru: Instrument name'] | 68 | comments=[comments,'instru: Instrument name'] |
69 | comments=[comments,'filter: Instrument filter'] | 69 | comments=[comments,'filter: Instrument filter'] |
70 | comments=[comments,'wave: Filter reference wavelength [mic]'] | 70 | comments=[comments,'wave: Filter reference wavelength [mic]'] |
71 | -comments=[comments,'spec: SED intensity [MJy/sr]'] | ||
72 | -comments=[comments,'error: 1-sigma Uncertainty on spec [MJy/sr]'] | 71 | +comments=[comments,'StokesI: SED intensity [MJy/sr]'] |
73 | comments=[comments,'StokesQ: Q Stokes parameter intensity [MJy/sr]'] | 72 | comments=[comments,'StokesQ: Q Stokes parameter intensity [MJy/sr]'] |
74 | comments=[comments,'StokesU: U Stokes parameter intensity [MJy/sr]'] | 73 | comments=[comments,'StokesU: U Stokes parameter intensity [MJy/sr]'] |
75 | comments=[comments,'largeP: Polarized intensity P [MJy/sr]'] | 74 | comments=[comments,'largeP: Polarized intensity P [MJy/sr]'] |
src/idl/dustem_plot_fit_sed.pro
@@ -266,7 +266,15 @@ IF keyword_set(rchi2) THEN BEGIN | @@ -266,7 +266,15 @@ IF keyword_set(rchi2) THEN BEGIN | ||
266 | ENDIF | 266 | ENDIF |
267 | 267 | ||
268 | xtit=textoidl('\lambda (\mum)') | 268 | xtit=textoidl('\lambda (\mum)') |
269 | -cgplot,(*!dustem_data.sed).wav,(*!dustem_data.sed).values/sed,/nodata,xtit=xtit,ytit='Normalized',tit='',/xlog,xr=xr,/ys,/xs,yr=[0,2],ylog=0,position=[0.12,0.14,0.96,0.35],/noerase,yticks=2,ymino=2,xticklen=0.1 | 269 | +;cgplot,(*!dustem_data.sed).wav,(*!dustem_data.sed).values/sed,/nodata,xtit=xtit,ytit='Normalized',tit='',/xlog,xr=xr,/ys,/xs,yr=[0,2],ylog=0,position=[0.12,0.14,0.96,0.35],/noerase,yticks=2,ymino=2,xticklen=0.1 |
270 | +;stop | ||
271 | +IF keyword_set(_extra) THEN BEGIN | ||
272 | + extra_kept={XRANGE:[0.,0.]} | ||
273 | + extra_tags=tag_names(_extra) | ||
274 | + ind=where(extra_tags EQ 'XRANGE',count) | ||
275 | + IF count NE 0 THEN extra_kept.XRANGE=_extra.(ind[0]) ;ELSE extra_kept=0 | ||
276 | +ENDIF | ||
277 | +cgplot,(*!dustem_data.sed).wav,(*!dustem_data.sed).values/sed,_extra=extra_kept,/nodata,xtit=xtit,ytit='Normalized',tit='',/xlog,/ys,/xs,yr=[0,2],ylog=0,position=[0.12,0.14,0.96,0.35],/noerase,yticks=2,ymino=2,xticklen=0.1 | ||
270 | ;plot the normalized data as well. | 278 | ;plot the normalized data as well. |
271 | IF count_spec NE 0 THEN BEGIN | 279 | IF count_spec NE 0 THEN BEGIN |
272 | xx=((*!dustem_data.sed).wav)[ind_spec] | 280 | xx=((*!dustem_data.sed).wav)[ind_spec] |
src/idl/dustem_plot_polar.pro
1 | -PRO dustem_plot_polar,st,p_dim,ps=ps,_Extra=extra,help=help,UV=UV,SED=SED,Pfrac=Pfrac,print_ratio=print_ratio,win=win,xr=xr,yr=yr,donotclose=donotclose,aligned=aligned,noerrbars=noerrbars,multi=multi,almabands=almabands,nsmooth=nsmooth | 1 | +PRO dustem_plot_polar,st,p_dim,ps=ps,_Extra=_extra,help=help,UV=UV,SED=SED,Pfrac=Pfrac,print_ratio=print_ratio,win=win,xr=xr,yr=yr,donotclose=donotclose,aligned=aligned,noerrbars=noerrbars,multi=multi,almabands=almabands,nsmooth=nsmooth |
2 | 2 | ||
3 | ;+ | 3 | ;+ |
4 | ; NAME: | 4 | ; NAME: |
@@ -209,8 +209,8 @@ IF ptr_valid(!dustem_data.polext) THEN BEGIN | @@ -209,8 +209,8 @@ IF ptr_valid(!dustem_data.polext) THEN BEGIN | ||
209 | endelse | 209 | endelse |
210 | 210 | ||
211 | if multi eq 0 then cgplot,st.polext.wav,st.polext.ext_tot/normpol,/nodata,xtit=xtit,ytit=ytit,tit=tit,xr=xr,yr=yr,ylog=ylog,xlog=1 | 211 | if multi eq 0 then cgplot,st.polext.wav,st.polext.ext_tot/normpol,/nodata,xtit=xtit,ytit=ytit,tit=tit,xr=xr,yr=yr,ylog=ylog,xlog=1 |
212 | - if multi eq 1 then cgplot,st.polext.wav,st.polext.ext_tot/normpol,/nodata,_Extra=extra,xtit='',ytit=ytit,tit=tit,xr=xr,yr=yr,ylog=ylog,position=[0.17,0.35,0.93,0.93],xtickformat='(A1)' ,xlog=1 | ||
213 | - if multi eq 2 then cgplot,st.polext.wav,st.polext.ext_tot/normpol,/nodata,_Extra=extra,xtit=xtit,ytit='Normalized',tit='',xr=xr,yr=[0,2],ylog=ylog,position=[0.17,0.14,0.93,0.35],/noerase,yticks=3,ymino=5,xticklen=0.1,xlog=1 | 212 | + if multi eq 1 then cgplot,st.polext.wav,st.polext.ext_tot/normpol,/nodata,_Extra=_extra,xtit='',ytit=ytit,tit=tit,xr=xr,yr=yr,ylog=ylog,position=[0.17,0.35,0.93,0.93],xtickformat='(A1)' ,xlog=1 |
213 | + if multi eq 2 then cgplot,st.polext.wav,st.polext.ext_tot/normpol,/nodata,_Extra=_extra,xtit=xtit,ytit='Normalized',tit='',xr=xr,yr=[0,2],ylog=ylog,position=[0.17,0.14,0.93,0.35],/noerase,yticks=3,ymino=5,xticklen=0.1,xlog=1 | ||
214 | 214 | ||
215 | 215 | ||
216 | FOR i=0L,Ngrains-1 DO BEGIN | 216 | FOR i=0L,Ngrains-1 DO BEGIN |
@@ -233,7 +233,7 @@ IF ptr_valid(!dustem_data.polext) THEN BEGIN | @@ -233,7 +233,7 @@ IF ptr_valid(!dustem_data.polext) THEN BEGIN | ||
233 | if multi eq 0 then begin | 233 | if multi eq 0 then begin |
234 | if not keyword_set(ps) then tit='Polarization fraction in extinction' | 234 | if not keyword_set(ps) then tit='Polarization fraction in extinction' |
235 | ytit='Polarization fraction' | 235 | ytit='Polarization fraction' |
236 | - cgplot,st.polext.wav,st.polext.ext_tot/st.ext.ext_tot,/nodata,_Extra=extra,xtit=xtit,ytit=ytit,tit=tit,xr=xr,yr=yr | 236 | + cgplot,st.polext.wav,st.polext.ext_tot/st.ext.ext_tot,/nodata,_Extra=_extra,xtit=xtit,ytit=ytit,tit=tit,xr=xr,yr=yr |
237 | FOR i=0L,Ngrains-1 DO BEGIN | 237 | FOR i=0L,Ngrains-1 DO BEGIN |
238 | cgoplot,st.polext.wav,smooth((st.polext.abs_grain(i)+st.polext.sca_grain(i))/(st.ext.abs_grain(i)+st.ext.sca_grain(i)),nsmooth),color=colors(i+1),psym=psym,line=ls(i+1) | 238 | cgoplot,st.polext.wav,smooth((st.polext.abs_grain(i)+st.polext.sca_grain(i))/(st.ext.abs_grain(i)+st.ext.sca_grain(i)),nsmooth),color=colors(i+1),psym=psym,line=ls(i+1) |
239 | ENDFOR | 239 | ENDFOR |
@@ -304,7 +304,7 @@ IF ptr_valid(!dustem_data.polsed) THEN BEGIN | @@ -304,7 +304,7 @@ IF ptr_valid(!dustem_data.polsed) THEN BEGIN | ||
304 | endelse | 304 | endelse |
305 | plotsym,0,/FILL | 305 | plotsym,0,/FILL |
306 | 306 | ||
307 | - cgoplot,((*!dustem_data.polsed).wav)(ind_filt),((*!dustem_data.polsed).values)(ind_filt)*fact/normpol(ind_filt),psym=8,_extra=extra,color='Orchid',thick=2;use_col_sed_filt | 307 | + cgoplot,((*!dustem_data.polsed).wav)(ind_filt),((*!dustem_data.polsed).values)(ind_filt)*fact/normpol(ind_filt),psym=8,_extra=_extra,color='Orchid',thick=2;use_col_sed_filt |
308 | if multi ne 2 then cgoplot,((*!dustem_data.polsed).wav),dustem_polsed/normpol,psym=6,color='red',symsize=2 | 308 | if multi ne 2 then cgoplot,((*!dustem_data.polsed).wav),dustem_polsed/normpol,psym=6,color='red',symsize=2 |
309 | 309 | ||
310 | 310 | ||
@@ -312,7 +312,7 @@ IF ptr_valid(!dustem_data.polsed) THEN BEGIN | @@ -312,7 +312,7 @@ IF ptr_valid(!dustem_data.polsed) THEN BEGIN | ||
312 | 312 | ||
313 | ; PLot color corrected POLSED | 313 | ; PLot color corrected POLSED |
314 | if keyword_set(ps) then plotsym,8,thick=8 else plotsym,8 | 314 | if keyword_set(ps) then plotsym,8,thick=8 else plotsym,8 |
315 | - if multi eq 0 then cgoplot,((*!dustem_data.polsed).wav)(ind_filt),dustem_polsed(ind_filt)/normpol(ind_filt),psym=8,syms=2,_extra=extra,col='red' | 315 | + if multi eq 0 then cgoplot,((*!dustem_data.polsed).wav)(ind_filt),dustem_polsed(ind_filt)/normpol(ind_filt),psym=8,syms=2,_extra=_extra,col='red' |
316 | ENDIF | 316 | ENDIF |
317 | 317 | ||
318 | IF tag_exist(*!dustem_scope,'SYNCHROTRON') THEN BEGIN ;bad test but let's leave it like this for the moment | 318 | IF tag_exist(*!dustem_scope,'SYNCHROTRON') THEN BEGIN ;bad test but let's leave it like this for the moment |
@@ -340,7 +340,7 @@ endif ;else BEGIN | @@ -340,7 +340,7 @@ endif ;else BEGIN | ||
340 | if not keyword_set(ps) then tit='Polarization fraction in emission' | 340 | if not keyword_set(ps) then tit='Polarization fraction in emission' |
341 | ytit=textoidl('P/I') | 341 | ytit=textoidl('P/I') |
342 | 342 | ||
343 | - plot_oi,st.polsed.wav,st.polsed.(Ngrains+1)/st.sed.(Ngrains+1),/nodata,_extra=extra,xtit=xtit,ytit=ytit,tit=tit,/xlog,xr=xr,yr=yr | 343 | + plot_oi,st.polsed.wav,st.polsed.(Ngrains+1)/st.sed.(Ngrains+1),/nodata,_extra=_extra,xtit=xtit,ytit=ytit,tit=tit,/xlog,xr=xr,yr=yr |
344 | if (total(aligned) gt 0) then oplot,st.polsed.wav,st.polsed.(Ngrains+1)/st.sed.(Ngrains+1) | 344 | if (total(aligned) gt 0) then oplot,st.polsed.wav,st.polsed.(Ngrains+1)/st.sed.(Ngrains+1) |
345 | for i = 0, Ngrains-1 do if aligned(i) then oplot,st.polsed.wav,st.polsed.(i+1)/st.sed.(Ngrains+1),color=colors(i+1),psym=psym,linestyle=ls(i+1) | 345 | for i = 0, Ngrains-1 do if aligned(i) then oplot,st.polsed.wav,st.polsed.(i+1)/st.sed.(Ngrains+1),color=colors(i+1),psym=psym,linestyle=ls(i+1) |
346 | 346 | ||
@@ -357,7 +357,7 @@ endif ;else BEGIN | @@ -357,7 +357,7 @@ endif ;else BEGIN | ||
357 | ind_filt_polfrac=where((*!dustem_data.polfrac).filt_names NE 'SPECTRUM',count_filt_polfrac) | 357 | ind_filt_polfrac=where((*!dustem_data.polfrac).filt_names NE 'SPECTRUM',count_filt_polfrac) |
358 | IF count_filt_polfrac NE 0 THEN BEGIN | 358 | IF count_filt_polfrac NE 0 THEN BEGIN |
359 | plotsym,0,/FILL | 359 | plotsym,0,/FILL |
360 | - oplot,((*!dustem_data.polfrac).wav)(ind_filt_polfrac),((*!dustem_data.polfrac).values)(ind_filt_polfrac),psym=8,_extra=extra,color=use_col_sed_filt | 360 | + oplot,((*!dustem_data.polfrac).wav)(ind_filt_polfrac),((*!dustem_data.polfrac).values)(ind_filt_polfrac),psym=8,_extra=_extra,color=use_col_sed_filt |
361 | if not keyword_set(noerrbars) then err_bar,((*!dustem_data.polfrac).wav)(ind_filt_polfrac),((*!dustem_data.polfrac).values)(ind_filt_polfrac),yrms=2*((*!dustem_data.polfrac).sigma)(ind_filt_polfrac),color=use_col_sed_filt | 361 | if not keyword_set(noerrbars) then err_bar,((*!dustem_data.polfrac).wav)(ind_filt_polfrac),((*!dustem_data.polfrac).values)(ind_filt_polfrac),yrms=2*((*!dustem_data.polfrac).sigma)(ind_filt_polfrac),color=use_col_sed_filt |
362 | print,((*!dustem_data.polfrac).wav)(ind_filt_polfrac),((*!dustem_data.polfrac).values)(ind_filt_polfrac) | 362 | print,((*!dustem_data.polfrac).wav)(ind_filt_polfrac),((*!dustem_data.polfrac).values)(ind_filt_polfrac) |
363 | endif | 363 | endif |