Commit a0f5229c7e01dcf042882c16bc16ef87bc8f881f
Exists in
master
Merge branch 'master' of https://gitlab.irap.omp.eu/OV-GSO-DC/dustem-wrapper_idl
Showing
3 changed files
with
21 additions
and
6 deletions
Show diff stats
src/idl/dustem_fit_intensity_example.pro
... | ... | @@ -331,6 +331,17 @@ if keyword_set(wait) then begin |
331 | 331 | wait,wait |
332 | 332 | end |
333 | 333 | |
334 | + | |
335 | + | |
336 | +;IC: - | |
337 | +;The final plot is automatically plotted | |
338 | +;and a (Final run) string is automatically added | |
339 | +;to modify this go to dustemwrap_plot and search for the string '(FINAL_RUN)' | |
340 | +;This is true for OOP plotting. | |
341 | +;However, even thought the last iteration for noobj plotting is plotted, the '(FINAL_RUN)' string isn't applied | |
342 | +;to modify this, got to dustemwrap_plot_noobj and search for the '(RUNNING)' string. | |
343 | +;an extra condition using !dustem_end (signaling end of fit) will have to be used. | |
344 | + | |
334 | 345 | ;=== MAKE THE FINAL PLOT |
335 | 346 | IF keyword_set(postscript) THEN BEGIN |
336 | 347 | dir_ps='./' |
... | ... | @@ -340,7 +351,7 @@ IF keyword_set(postscript) THEN BEGIN |
340 | 351 | ENDIF |
341 | 352 | IF !dustem_noobj THEN BEGIN |
342 | 353 | dustemwrap_plot_noobj,*(*!dustem_fit).CURRENT_PARAM_VALUES,dummy,xr=xr,/xstyle,yr=yr,/ysty,/ylog,/xlog,title=tit+' (Final fit)' |
343 | -ENDIF ELSE BEGIN | |
354 | + ENDIF ELSE BEGIN | |
344 | 355 | dustemwrap_plot,*(*!dustem_fit).CURRENT_PARAM_VALUES,dummy,xr=xr,/xstyle,yr=yr,/ysty,/ylog,/xlog,title=tit+' (Final fit)' |
345 | 356 | ENDELSE |
346 | 357 | |
... | ... | @@ -355,6 +366,11 @@ if keyword_set(wait) then begin |
355 | 366 | wait,wait |
356 | 367 | end |
357 | 368 | |
369 | +;IC: Last iteration is automatically plotted. | |
370 | +;I think modifications will have to be applied to dustemwrap_plot... | |
371 | +;idea: create a system variable that signals if the fits file has been successfully saved and use it in the dustemwrap_plot(obj/noobj) routine(s) | |
372 | +;to add the '(From saved FITS file)' string to the title | |
373 | +; | |
358 | 374 | IF keyword_set(fits_save_and_restore) THEN BEGIN |
359 | 375 | message,'Writing out results structure: '+fits_save_and_restore,/info |
360 | 376 | dustem_write_fits_table,filename=fits_save_and_restore,help=help | ... | ... |
src/idl/dustemwrap_plot.pro
... | ... | @@ -434,7 +434,7 @@ if test_m then begin |
434 | 434 | |
435 | 435 | ;NB issue here because the user can't modify the title after the dustem_mpfit_data call at the main procedure level (user proc) |
436 | 436 | ;Getting the width of the title |
437 | - tit=string(_extra.title); | |
437 | + tit=!dustem_plot_range.title_m; | |
438 | 438 | |
439 | 439 | cgtext, 0.3, 0.95,tit+' (RUNNING)',color=0,/normal,charsize=-1,width=thiswidth,/addcmd & cmdind_m+=1 |
440 | 440 | widthtot = thiswidth |
... | ... | @@ -836,7 +836,7 @@ if test_x then begin |
836 | 836 | |
837 | 837 | |
838 | 838 | ;Getting the width of the title |
839 | - tit=string(_extra.title); | |
839 | + tit=!dustem_plot_range.title_x; | |
840 | 840 | |
841 | 841 | cgtext, 0.3, 0.95,tit+' (RUNNING)',color=0,/normal,charsize=-1,width=thiswidth,/addcmd & cmdind_x+=1 |
842 | 842 | widthtot = thiswidth | ... | ... |
src/idl/dustemwrap_plot_noobj.pro
... | ... | @@ -171,7 +171,6 @@ new_mouchard.chi2=(*!dustem_fit).chi2 |
171 | 171 | new_mouchard.rchi2=(*!dustem_fit).rchi2 |
172 | 172 | |
173 | 173 | |
174 | - | |
175 | 174 | ;IC: I've commented this test below but it was uncommented. I don't understand its function. |
176 | 175 | ;Current parameter values including plugins have been available at each iteration prior to commenting this. |
177 | 176 | ;Leaving as is. |
... | ... | @@ -412,7 +411,7 @@ if test_m then begin |
412 | 411 | |
413 | 412 | ;NB issue here because the user can't modify the title after the dustem_mpfit_data call at the main procedure level (user proc) |
414 | 413 | ;Getting the width of the title |
415 | - tit=string(_extra.title); | |
414 | + tit=!dustem_plot_range.title_m; | |
416 | 415 | |
417 | 416 | cgtext, 0.3, 0.95,tit+' (RUNNING)',color=0,/normal,charsize=-1,width=thiswidth |
418 | 417 | widthtot = thiswidth |
... | ... | @@ -682,7 +681,7 @@ if test_x then begin |
682 | 681 | |
683 | 682 | |
684 | 683 | ;Getting the width of the title |
685 | - tit=string(_extra.title); | |
684 | + tit=!dustem_plot_range.title_x; | |
686 | 685 | |
687 | 686 | cgtext, 0.3, 0.95,tit+' (RUNNING)',color=0,/normal,charsize=-1,width=thiswidth |
688 | 687 | widthtot = thiswidth | ... | ... |