Commit a0f5229c7e01dcf042882c16bc16ef87bc8f881f

Authored by Annie Hughes
2 parents 70982162 cbdd1393
Exists in master

Merge branch 'master' of https://gitlab.irap.omp.eu/OV-GSO-DC/dustem-wrapper_idl

src/idl/dustem_fit_intensity_example.pro
@@ -331,6 +331,17 @@ if keyword_set(wait) then begin @@ -331,6 +331,17 @@ if keyword_set(wait) then begin
331 wait,wait 331 wait,wait
332 end 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 ;=== MAKE THE FINAL PLOT 345 ;=== MAKE THE FINAL PLOT
335 IF keyword_set(postscript) THEN BEGIN 346 IF keyword_set(postscript) THEN BEGIN
336 dir_ps='./' 347 dir_ps='./'
@@ -340,7 +351,7 @@ IF keyword_set(postscript) THEN BEGIN @@ -340,7 +351,7 @@ IF keyword_set(postscript) THEN BEGIN
340 ENDIF 351 ENDIF
341 IF !dustem_noobj THEN BEGIN 352 IF !dustem_noobj THEN BEGIN
342 dustemwrap_plot_noobj,*(*!dustem_fit).CURRENT_PARAM_VALUES,dummy,xr=xr,/xstyle,yr=yr,/ysty,/ylog,/xlog,title=tit+' (Final fit)' 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 dustemwrap_plot,*(*!dustem_fit).CURRENT_PARAM_VALUES,dummy,xr=xr,/xstyle,yr=yr,/ysty,/ylog,/xlog,title=tit+' (Final fit)' 355 dustemwrap_plot,*(*!dustem_fit).CURRENT_PARAM_VALUES,dummy,xr=xr,/xstyle,yr=yr,/ysty,/ylog,/xlog,title=tit+' (Final fit)'
345 ENDELSE 356 ENDELSE
346 357
@@ -355,6 +366,11 @@ if keyword_set(wait) then begin @@ -355,6 +366,11 @@ if keyword_set(wait) then begin
355 wait,wait 366 wait,wait
356 end 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 IF keyword_set(fits_save_and_restore) THEN BEGIN 374 IF keyword_set(fits_save_and_restore) THEN BEGIN
359 message,'Writing out results structure: '+fits_save_and_restore,/info 375 message,'Writing out results structure: '+fits_save_and_restore,/info
360 dustem_write_fits_table,filename=fits_save_and_restore,help=help 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,7 +434,7 @@ if test_m then begin
434 434
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) 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 ;Getting the width of the title 436 ;Getting the width of the title
437 - tit=string(_extra.title); 437 + tit=!dustem_plot_range.title_m;
438 438
439 cgtext, 0.3, 0.95,tit+' (RUNNING)',color=0,/normal,charsize=-1,width=thiswidth,/addcmd & cmdind_m+=1 439 cgtext, 0.3, 0.95,tit+' (RUNNING)',color=0,/normal,charsize=-1,width=thiswidth,/addcmd & cmdind_m+=1
440 widthtot = thiswidth 440 widthtot = thiswidth
@@ -836,7 +836,7 @@ if test_x then begin @@ -836,7 +836,7 @@ if test_x then begin
836 836
837 837
838 ;Getting the width of the title 838 ;Getting the width of the title
839 - tit=string(_extra.title); 839 + tit=!dustem_plot_range.title_x;
840 840
841 cgtext, 0.3, 0.95,tit+' (RUNNING)',color=0,/normal,charsize=-1,width=thiswidth,/addcmd & cmdind_x+=1 841 cgtext, 0.3, 0.95,tit+' (RUNNING)',color=0,/normal,charsize=-1,width=thiswidth,/addcmd & cmdind_x+=1
842 widthtot = thiswidth 842 widthtot = thiswidth
src/idl/dustemwrap_plot_noobj.pro
@@ -171,7 +171,6 @@ new_mouchard.chi2=(*!dustem_fit).chi2 @@ -171,7 +171,6 @@ new_mouchard.chi2=(*!dustem_fit).chi2
171 new_mouchard.rchi2=(*!dustem_fit).rchi2 171 new_mouchard.rchi2=(*!dustem_fit).rchi2
172 172
173 173
174 -  
175 ;IC: I've commented this test below but it was uncommented. I don't understand its function. 174 ;IC: I've commented this test below but it was uncommented. I don't understand its function.
176 ;Current parameter values including plugins have been available at each iteration prior to commenting this. 175 ;Current parameter values including plugins have been available at each iteration prior to commenting this.
177 ;Leaving as is. 176 ;Leaving as is.
@@ -412,7 +411,7 @@ if test_m then begin @@ -412,7 +411,7 @@ if test_m then begin
412 411
413 ;NB issue here because the user can't modify the title after the dustem_mpfit_data call at the main procedure level (user proc) 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 ;Getting the width of the title 413 ;Getting the width of the title
415 - tit=string(_extra.title); 414 + tit=!dustem_plot_range.title_m;
416 415
417 cgtext, 0.3, 0.95,tit+' (RUNNING)',color=0,/normal,charsize=-1,width=thiswidth 416 cgtext, 0.3, 0.95,tit+' (RUNNING)',color=0,/normal,charsize=-1,width=thiswidth
418 widthtot = thiswidth 417 widthtot = thiswidth
@@ -682,7 +681,7 @@ if test_x then begin @@ -682,7 +681,7 @@ if test_x then begin
682 681
683 682
684 ;Getting the width of the title 683 ;Getting the width of the title
685 - tit=string(_extra.title); 684 + tit=!dustem_plot_range.title_x;
686 685
687 cgtext, 0.3, 0.95,tit+' (RUNNING)',color=0,/normal,charsize=-1,width=thiswidth 686 cgtext, 0.3, 0.95,tit+' (RUNNING)',color=0,/normal,charsize=-1,width=thiswidth
688 widthtot = thiswidth 687 widthtot = thiswidth