Commit 478a4d4931f837ff426e6088315808d3e998de8e
1 parent
18e47096
Exists in
master
Correcting some plotting typos in plot_dataset and set_plot_rannge + Forgotten m…
…pfit run update + correcting fit_ext_pol_example non-regression test.
Showing
4 changed files
with
68 additions
and
17 deletions
Show diff stats
src/idl/dustem_fit_ext_pol_example.pro
... | ... | @@ -141,7 +141,7 @@ pd = [ $ |
141 | 141 | 'dustem_plugin_modify_dust_polx_2' ] |
142 | 142 | |
143 | 143 | true_vals = [7.1e-4, 1.3e-3,5.6e-3,35.] ; these are the true values that will be used to generate the data if no ext_file is specified |
144 | -iv = true_vals+[5.00E-4,-7.00E-4,8.00E-4,10] ; this is the vector of starting guesses for the fit | |
144 | +iv = true_vals+[5.00E-4,-7.00E-4,8.00E-4,5] ; this is the vector of starting guesses for the fit | |
145 | 145 | |
146 | 146 | Npar=n_elements(pd) |
147 | 147 | ulimed=replicate(0,Npar) |
... | ... | @@ -229,13 +229,15 @@ tol=1.e-10 |
229 | 229 | ;=== INFORMATION TO MAKE THE PLOTS |
230 | 230 | ;=== _x/_extinction means extinction plots, _m/_emissions means emission plots |
231 | 231 | xr_x=[0.01,30] |
232 | -yr_x=[1.00E-10,10] | |
232 | +yr_fpolext=[1.00E-10,30] | |
233 | + | |
234 | +;yr_fpolext=[1e-4,30] | |
233 | 235 | tit='Dust Optical Depth' |
234 | 236 | |
235 | 237 | ;=== RUN THE FIT |
236 | 238 | t1=systime(0,/sec) |
237 | 239 | res=dustem_mpfit_data(tol=tol,Nitermax=use_Nitermax,gtol=gtol $ |
238 | - ,/xlog,/ylog,xr_x=xr_x,yr_x=yr_x,xtit=xtit,ytit=ytit,title=tit $ | |
240 | + ,/xlog,/ylog,xr_x=xr_x,yr_fpolext=yr_fpolext,xtit=xtit,ytit=ytit,title=tit $ | |
239 | 241 | ,legend_xpos=legend_xpos,legend_ypos=legend_ypos $ |
240 | 242 | ,errors=errors,chi2=chi2,rchi2=rchi2,show_plot=show_plot) |
241 | 243 | t2=systime(0,/sec) |
... | ... | @@ -256,9 +258,9 @@ IF keyword_set(fits_save_and_restore) THEN BEGIN |
256 | 258 | ;==== plot result taken from the saved fits table |
257 | 259 | res=*(*!dustem_fit).CURRENT_PARAM_VALUES |
258 | 260 | IF !dustem_noobj THEN BEGIN |
259 | - dustemwrap_plot_noobj,res,dustem_st,xr=xr,/xstyle,yr=yr,/ysty,/ylog,/xlog,title=tit+' (From Saved FITS file)' | |
261 | + dustemwrap_plot_noobj,res,st=dustem_st,xr=xr,/xstyle,yr=yr,/ysty,/ylog,/xlog,title=tit+' (From Saved FITS file)' | |
260 | 262 | ENDIF ELSE BEGIN |
261 | - dustemwrap_plot,res,dustem_st,xr=xr,/xstyle,yr=yr,/ysty,/ylog,/xlog,title=tit+' (From Saved FITS file)' | |
263 | + dustemwrap_plot,res,st=dustem_st,xr=xr,/xstyle,yr=yr,/ysty,/ylog,/xlog,title=tit+' (From Saved FITS file)' | |
262 | 264 | ENDELSE |
263 | 265 | IF keyword_set(wait) THEN BEGIN |
264 | 266 | message,'Saved the results as FITS in the file: '+fits_save_and_restore+', and made a plot using the data in this file',/info | ... | ... |
src/idl/dustem_mpfit_run.pro
... | ... | @@ -337,12 +337,61 @@ If !dustem_show_plot THEN BEGIN |
337 | 337 | ;=== plotting the fit |
338 | 338 | if !dustem_iter.act NE !dustem_iter.prv or !dustem_iter.prv EQ 1 then begin |
339 | 339 | IF !dustem_noobj EQ 0 THEN BEGIN |
340 | - dustemwrap_plot,p_dim, st=st, dustem_sed=dustem_sed, SED_spec=SED_spec, dustem_qsed=dustem_qsed, Q_spec=Q_spec, dustem_used=dustem_used, U_spec=U_spec, dustem_polsed=dustem_polsed, $ | |
341 | - P_spec=P_spec, dustem_polfrac=dustem_polfrac, SP_spec=SP_spec, dustem_psi_em=dustem_psi_em, PSI_spec=PSI_spec, dustem_ext=dustem_ext, EXT_spec=EXT_spec, dustem_qext=dustem_qext, $ | |
342 | - QEXT_spec=QEXT_spec, dustem_uext=dustem_uext, UEXT_spec=UEXT_spec, dustem_polext=dustem_polext, POLEXT_spec=POLEXT_spec, dustem_fpolext=dustem_fpolext, SPEXT_spec=SPEXT_spec, $ | |
343 | - dustem_psi_ext=dustem_psi_ext, PSIEXT_spec=PSIEXT_spec, _extra=_extra | |
340 | + dustemwrap_plot, p_dim, $ | |
341 | + st = st, $ | |
342 | + dustem_sed = dustem_sed, $ | |
343 | + SED_spec = SED_spec, $ | |
344 | + dustem_qsed = dustem_qsed, $ | |
345 | + Q_spec = Q_spec, $ | |
346 | + dustem_used = dustem_used, $ | |
347 | + U_spec = U_spec, $ | |
348 | + dustem_polsed = dustem_polsed, $ | |
349 | + P_spec = P_spec, $ | |
350 | + dustem_polfrac = dustem_polfrac, $ | |
351 | + SP_spec = SP_spec, $ | |
352 | + dustem_psi_em = dustem_psi_em, $ | |
353 | + PSI_spec = PSI_spec, $ | |
354 | + dustem_ext = dustem_ext, $ | |
355 | + EXT_spec = EXT_spec, $ | |
356 | + dustem_qext = dustem_qext, $ | |
357 | + QEXT_spec = QEXT_spec, $ | |
358 | + dustem_uext = dustem_uext, $ | |
359 | + UEXT_spec = UEXT_spec, $ | |
360 | + dustem_polext = dustem_polext, $ | |
361 | + POLEXT_spec = POLEXT_spec, $ | |
362 | + dustem_fpolext = dustem_fpolext, $ | |
363 | + SPEXT_spec = SPEXT_spec, $ | |
364 | + dustem_psi_ext = dustem_psi_ext, $ | |
365 | + PSIEXT_spec = PSIEXT_spec, $ | |
366 | + _extra=_extra | |
344 | 367 | ENDIF ELSE BEGIN |
345 | - dustemwrap_plot_noobj,p_dim,st,dustem_sed,SED_spec,dustem_qsed,Q_spec,dustem_used,U_spec,dustem_polsed,P_spec,dustem_polfrac,SP_spec, dustem_psi_em, PSI_spec,dustem_ext,EXT_spec,dustem_qext,QEXT_spec,dustem_uext,UEXT_spec,dustem_polext,POLEXT_spec,dustem_fpolext,SPEXT_spec,dustem_psi_ext,PSIEXT_spec,_extra=_extra | |
368 | + dustemwrap_plot_noobj, p_dim,$ | |
369 | + st = st,$ | |
370 | + dustem_sed = dustem_sed, $ | |
371 | + SED_spec = SED_spec, $ | |
372 | + dustem_qsed = dustem_qsed, $ | |
373 | + Q_spec = Q_spec, $ | |
374 | + dustem_used = dustem_used, $ | |
375 | + U_spec = U_spec, $ | |
376 | + dustem_polsed = dustem_polsed, $ | |
377 | + P_spec = P_spec, $ | |
378 | + dustem_polfrac = dustem_polfrac, $ | |
379 | + SP_spec = SP_spec, $ | |
380 | + dustem_psi_em = dustem_psi_em, $ | |
381 | + PSI_spec = PSI_spec, $ | |
382 | + dustem_ext = dustem_ext, $ | |
383 | + EXT_spec = EXT_spec, $ | |
384 | + dustem_qext = dustem_qext, $ | |
385 | + QEXT_spec = QEXT_spec, $ | |
386 | + dustem_uext = dustem_uext, $ | |
387 | + UEXT_spec = UEXT_spec, $ | |
388 | + dustem_polext = dustem_polext, $ | |
389 | + POLEXT_spec = POLEXT_spec, $ | |
390 | + dustem_fpolext = dustem_fpolext, $ | |
391 | + SPEXT_spec = SPEXT_spec, $ | |
392 | + dustem_psi_ext = dustem_psi_ext, $ | |
393 | + PSIEXT_spec = PSIEXT_spec, $ | |
394 | + _extra = _extra | |
346 | 395 | ENDELSE |
347 | 396 | if !dustem_iter.act EQ 1 then begin |
348 | 397 | !dustem_iter.prv=0 | ... | ... |
src/idl/dustem_plot_dataset.pro
... | ... | @@ -1005,7 +1005,7 @@ if keyword_set(dataset) then begin ;This shouldn't be a keyword. Should be chang |
1005 | 1005 | ;SETTING THE PLOT RANGE |
1006 | 1006 | xr = !dustem_plot_range.fpolext.xr |
1007 | 1007 | yr = !dustem_plot_range.fpolext.yr |
1008 | - | |
1008 | + stop | |
1009 | 1009 | |
1010 | 1010 | idx_filt=where((*(*!dustem_data).fpolext).filt_names NE 'SPECTRUM',ct_filt) |
1011 | 1011 | idx_spec=where((*(*!dustem_data).fpolext).filt_names EQ 'SPECTRUM',ct_spec) |
... | ... | @@ -1294,7 +1294,7 @@ if keyword_set(dataset) then begin ;This shouldn't be a keyword. Should be chang |
1294 | 1294 | |
1295 | 1295 | if keyword_set(refresh) then begin ;The data points in the plot are being refreshed |
1296 | 1296 | |
1297 | - cgplot,1/vectw,vectx,/nodata,/xlog,/ylog,/ys,xs=1,pos=position[0],noerase=1,charsize=1.15,xtickformat='(A1)',ytickformat='(A1)',color='Powder Blue',xr=xr,xtit='',yr=yr,/ylog,psym=8,syms=0.8 | |
1297 | + cgplot,1/vectw,vectx,/nodata,/xlog,/ys,xs=1,pos=position[0],noerase=1,charsize=1.15,xtickformat='(A1)',ytickformat='(A1)',color='Powder Blue',xr=xr,xtit='',yr=yr,psym=8,syms=0.8 | |
1298 | 1298 | |
1299 | 1299 | ;##################TAKEN FROM SED |
1300 | 1300 | |
... | ... | @@ -2218,7 +2218,7 @@ if keyword_set(dataset) then begin ;This shouldn't be a keyword. Should be chang |
2218 | 2218 | if keyword_set(refresh) then begin ;The data points in the plot that are being refreshed |
2219 | 2219 | |
2220 | 2220 | ;Making sure we're placed in the right plot to refresh. Here normalized plot for QEXT. |
2221 | - cgplot,1/vectw,vectx,/nodata,/xlog,/ys,xs=1,pos=position[1],noerase=1,charsize=1.15,xtickformat='(A1)',ytickformat='(A1)',color='Powder Blue',xr=xr,xtit='',yr=[0.0,2.0],/ylog,psym=8,syms=0.8 | |
2221 | + cgplot,1/vectw,vectx,/nodata,/xlog,/ys,xs=1,pos=position[1],noerase=1,charsize=1.15,xtickformat='(A1)',ytickformat='(A1)',color='Powder Blue',xr=xr,xtit='',yr=[0.0,2.0],psym=8,syms=0.8 | |
2222 | 2222 | |
2223 | 2223 | IF ct_spec NE 0 THEN BEGIN |
2224 | 2224 | |
... | ... | @@ -2574,7 +2574,7 @@ if keyword_set(dataset) then begin ;This shouldn't be a keyword. Should be chang |
2574 | 2574 | if keyword_set(refresh) then begin ;The data points in the plot that are being refreshed |
2575 | 2575 | |
2576 | 2576 | ;Making sure we're placed in the right plot to refresh. Here normalized plot for QEXT. |
2577 | - cgplot,1/vectw,vectx,/nodata,/xlog,/ys,xs=1,pos=position[1],noerase=1,charsize=1.15,xtickformat='(A1)',ytickformat='(A1)',color='Powder Blue',xr=xr,xtit='',yr=[0.0,2.0],/ylog,psym=8,syms=0.8 | |
2577 | + cgplot,1/vectw,vectx,/nodata,/xlog,/ys,xs=1,pos=position[1],noerase=1,charsize=1.15,xtickformat='(A1)',ytickformat='(A1)',color='Powder Blue',xr=xr,xtit='',yr=[0.0,2.0],psym=8,syms=0.8 | |
2578 | 2578 | |
2579 | 2579 | IF ct_spec NE 0 THEN BEGIN |
2580 | 2580 | ... | ... |
src/idl/dustem_set_plot_range.pro
... | ... | @@ -224,7 +224,7 @@ IF keyword_set(_extra) THEN BEGIN |
224 | 224 | |
225 | 225 | idyr_polext = where(strmid(strupcase(tgnms_extra),0,1) EQ 'Y' and $ |
226 | 226 | STRUPCASE(strmid(tgnms_extra,6,/reverse_offset)) EQ '_POLEXT',ctyr_polext) |
227 | - | |
227 | + stop | |
228 | 228 | idyr_psi_ext = where(strmid(strupcase(tgnms_extra),0,1) EQ 'Y' and $ |
229 | 229 | STRUPCASE(strmid(tgnms_extra,6,/reverse_offset)) EQ 'PSI_EXT',ctyr_psi_ext) |
230 | 230 | |
... | ... | @@ -232,7 +232,7 @@ IF keyword_set(_extra) THEN BEGIN |
232 | 232 | STRUPCASE(strmid(tgnms_extra,3,/reverse_offset)) EQ 'UEXT',ctyr_uext) |
233 | 233 | |
234 | 234 | idyr_fpolext = where(strmid(strupcase(tgnms_extra),0,1) EQ 'Y' and $ |
235 | - STRUPCASE(strmid(tgnms_extra,6,/reverse_offset)) EQ 'FPLOEXT',ctyr_fpolext) | |
235 | + STRUPCASE(strmid(tgnms_extra,6,/reverse_offset)) EQ 'FPOLEXT',ctyr_fpolext) | |
236 | 236 | |
237 | 237 | idyr_qext = where(strmid(strupcase(tgnms_extra),0,1) EQ 'Y' and $ |
238 | 238 | STRUPCASE(strmid(tgnms_extra,3,/reverse_offset)) EQ 'QEXT',ctyr_qext) |
... | ... | @@ -433,7 +433,7 @@ IF keyword_set(_extra) THEN BEGIN |
433 | 433 | STRUPCASE(strmid(tgnms_extra,3,/reverse_offset)) EQ 'UEXT',ctyr_uext) |
434 | 434 | |
435 | 435 | idyr_fpolext = where(strmid(strupcase(tgnms_extra),0,1) EQ 'Y' and $ |
436 | - STRUPCASE(strmid(tgnms_extra,6,/reverse_offset)) EQ 'FPLOEXT',ctyr_fpolext) | |
436 | + STRUPCASE(strmid(tgnms_extra,6,/reverse_offset)) EQ 'FPOLEXT',ctyr_fpolext) | |
437 | 437 | |
438 | 438 | idyr_qext = where(strmid(strupcase(tgnms_extra),0,1) EQ 'Y' and $ |
439 | 439 | STRUPCASE(strmid(tgnms_extra,3,/reverse_offset)) EQ 'QEXT',ctyr_qext) | ... | ... |