run_phangs_parameters.pro 12.1 KB
PRO run_phangs_parameters, keys=keys 




IF not keyword_set(keys) THEN BEGIN
    keys=0
ENDIF



; =============================================================================
; Plot operation of parameters maps at 1 acrsec
; =============================================================================

IF keys EQ 0 THEN BEGIN
    
    show=1
    
    res=phangs_parameters(model='DL07',source_name='ngc0628',/normalize,fit_G0=1,set_yvsg=1,/save,resolution_value=1./60.^2 $
                                         ,force_mathis=force_mathis $
    								     ,/do_postscripts,postscripts_dir=postscripts_dir,show=show)
    								     
stop   								     
    
    								     
ENDIF
								    
								    
; =============================================================================
; Plot operation of parameters maps at PACS3
; =============================================================================

IF keys EQ 1 THEN BEGIN
    
    show=1
    
    res=phangs_parameters(model='DL07',source_name='ngc0628',/normalize,fit_G0=1,set_yvsg=1,/save,resolution_filter='PACS3' $
                                         ,force_mathis=force_mathis $
    								     ,/do_postscripts,postscripts_dir=postscripts_dir,show=show)
    								     
stop   								     
    
    								     
ENDIF

					    
								    

; =============================================================================
; Plot parameters maps of mathis vs without mathis at 1 arcsec
; =============================================================================


IF keys EQ 2 THEN BEGIN	
    
    show=0	
						      
    result_mathis=phangs_parameters(model='DL07',source_name='ngc0628',/normalize,fit_G0=1,set_yvsg=1,/save,resolution_value=1./60.^2 $
                                         ,force_mathis=1 $
    								     ,/do_postscripts,postscripts_dir=postscripts_dir,show=show)
    								     
    result=phangs_parameters(model='DL07',source_name='ngc0628',/normalize,fit_G0=1,set_yvsg=1,/save,resolution_value=1./60.^2 $
                                         ,force_mathis=0 $
    								     ,/do_postscripts,postscripts_dir=postscripts_dir,show=show)	
    relative_diff_pah_vs_pah_mathis = la_div(la_sub(result.Ypah_map,result_mathis.Ypah_map),result_mathis.Ypah_map)*100.		
    relative_diff_Yg1_vs_Yg1_mathis = la_div(la_sub(result.Yg1_map,result_mathis.Yg1_map),result_mathis.Yg1_map)*100.	
    relative_diff_Yg2_vs_Yg2_mathis = la_div(la_sub(result.Yg2_map,result_mathis.Yg2_map),result_mathis.Yg2_map)*100.	
    relative_diff_Yg3_vs_Yg3_mathis = la_div(la_sub(result.Yg3_map,result_mathis.Yg3_map),result_mathis.Yg3_map)*100.	
   
    obp= [1.1,0.,1.15,1]
    win=0L
    image_color_table='jpbloadct,/whitebackground'
	window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-4,-2]
    title='Ypah_map_mathis'
    image_cont20,la_log10(result_mathis.Ypah_map),result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
   
    window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-4,-2]
    title='Ypah_map'
    image_cont20,la_log10(result.Ypah_map),result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title		
    
    window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-100,100]
    title='relative_diff_pah_vs_pah_mathis'
    image_cont20,relative_diff_pah_vs_pah_mathis,result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
    
   	window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-4,-2]
    title='Yg1_map_mathis'
    image_cont20,la_log10(result_mathis.Yg1_map),result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	

   	window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-4,-2]
    title='Yg1_map'
    image_cont20,la_log10(result.Yg1_map),result.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
       
    window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-100,100]
    title='relative_diff_yg1_vs_yg1_mathis'
    image_cont20,relative_diff_Yg1_vs_Yg1_mathis,result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
    
   	window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-4,-2]
    title='Yg2_map_mathis'
    image_cont20,la_log10(result_mathis.Yg2_map),result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
    
   	window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-4,-2]
    title='Yg2_map'
    image_cont20,la_log10(result.Yg2_map),result.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
    
    window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-100,100]
    title='relative_diff_yg2_vs_yg2_mathis'
    image_cont20,relative_diff_Yg2_vs_Yg2_mathis,result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
    
        
   	window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-4,-2]
    title='Yg3_map_mathis'
    image_cont20,la_log10(result_mathis.Yg3_map),result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
    
   	window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-4,-2]
    title='Yg3_map'
    image_cont20,la_log10(result.Yg3_map),result.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	

    window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-100,100]
    title='relative_diff_yg3_vs_yg3_mathis'
    image_cont20,relative_diff_Yg3_vs_Yg3_mathis,result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
    
    window,win,xsize=900,ysize=900 & win=win+1
    x_range=[1.e-5,1.e-1]
    y_range=[1.e-5,1.e-1]
    !p.multi=[0,2,2]
    cgplot,result_mathis.Ypah_map,result.Ypah_map,/xlog,/ylog,xr=x_range,yr=y_range,/xsty,psym=3,xtit='Ypah_mathis',ytit='Ypah',title='ypah_vs_ypah_mathis'
    cgoplot, x_range, x_range,linesyle=2,color='red'
    cgplot,result_mathis.Yg1_map,result.Yg1_map,/xlog,/ylog,xr=x_range,yr=y_range,/xsty,psym=3,xtit='Yg1_mathis',ytit='Yg1',title='yg1_vs_yg1_mathis'
    cgoplot, x_range, x_range,linesyle=2,color='red'
    cgplot,result_mathis.Yg2_map,result.Yg2_map,/xlog,/ylog,xr=x_range,yr=y_range,/xsty,psym=3,xtit='Yg2_mathis',ytit='Yg2',title='yg2_vs_yg2_mathis'
    cgoplot, x_range, x_range,linesyle=2,color='red'
    cgplot,result_mathis.Yg3_map,result.Yg3_map,/xlog,/ylog,xr=x_range,yr=y_range,/xsty,psym=3,xtit='Yg3_mathis',ytit='Yg3',title='yg3_vs_yg3_mathis'
    cgoplot, x_range, x_range,linesyle=2,color='red'

ENDIF
; =============================================================================
; Plot parameters maps of mathis vs without mathis at PACS3
; =============================================================================
				 		    
IF keys EQ 3 THEN BEGIN	
    
    show=0
						      
    result_mathis=phangs_parameters(model='DL07',source_name='ngc0628',/normalize,fit_G0=1,set_yvsg=1,/save,resolution_filter='PACS3' $
                                         ,force_mathis=1 $
    								     ,/do_postscripts,postscripts_dir=postscripts_dir,show=show)
    								     
    result=phangs_parameters(model='DL07',source_name='ngc0628',/normalize,fit_G0=1,set_yvsg=1,/save,resolution_filter='PACS3'$
                                         ,force_mathis=0 $
    								     ,/do_postscripts,postscripts_dir=postscripts_dir,show=show)	
    relative_diff_pah_vs_pah_mathis = la_div(la_sub(result.Ypah_map,result_mathis.Ypah_map),result_mathis.Ypah_map)*100.		
    relative_diff_Yg1_vs_Yg1_mathis = la_div(la_sub(result.Yg1_map,result_mathis.Yg1_map),result_mathis.Yg1_map)*100.	
    relative_diff_Yg2_vs_Yg2_mathis = la_div(la_sub(result.Yg2_map,result_mathis.Yg2_map),result_mathis.Yg2_map)*100.	
    relative_diff_Yg3_vs_Yg3_mathis = la_div(la_sub(result.Yg3_map,result_mathis.Yg3_map),result_mathis.Yg3_map)*100.	
   
    obp= [1.1,0.,1.15,1]
    win=0L
    image_color_table='jpbloadct,/whitebackground'
    window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-4,-2]
    title='Ypah_map_mathis'
    image_cont20,la_log10(result_mathis.Ypah_map),result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
      
    window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-4,-2]
    title='Ypah_map'
    image_cont20,la_log10(result.Ypah_map),result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title		
    
    window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-100,100]
    title='relative_diff_pah_vs_pah_mathis'
    image_cont20,relative_diff_pah_vs_pah_mathis,result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
    
    window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-4,-2]
    title='Yg1_map_mathis'
    image_cont20,la_log10(result_mathis.Yg1_map),result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
    
    window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-4,-2]
    title='Yg1_map'
    image_cont20,la_log10(result.Yg1_map),result.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
       
    window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-100,100]
    title='relative_diff_yg1_vs_yg1_mathis'
    image_cont20,relative_diff_Yg1_vs_Yg1_mathis,result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
    
    window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-4,-2]
    title='Yg2_map_mathis'
    image_cont20,la_log10(result_mathis.Yg2_map),result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
    
      	window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-4,-2]
    title='Yg2_map'
    image_cont20,la_log10(result.Yg2_map),result.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
    
    window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-100,100]
    title='relative_diff_yg2_vs_yg2_mathis'
    image_cont20,relative_diff_Yg2_vs_Yg2_mathis,result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
    
        
      	window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-4,-2]
    title='Yg3_map_mathis'
    image_cont20,la_log10(result_mathis.Yg3_map),result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
    
    window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-4,-2]
    title='Yg3_map'
    image_cont20,la_log10(result.Yg3_map),result.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
    
    window,win,xsize=800,ysize=900 & win=win+1
    imrange=[-100,100]
    title='relative_diff_yg3_vs_yg3_mathis'
    image_cont20,relative_diff_Yg3_vs_Yg3_mathis,result_mathis.href,/square,imrange=imrange,axis_color_table=0,image_color_table=0,/silent,off_bar=obp,title=title	
    
    window,win,xsize=900,ysize=900 & win=win+1
    x_range=[1.e-5,1.e-1]
    y_range=[1.e-5,1.e-1]
    !p.multi=[0,2,2]
    cgplot,result_mathis.Ypah_map,result.Ypah_map,/xlog,/ylog,xr=x_range,yr=y_range,/xsty,psym=3,xtit='Ypah_mathis',ytit='Ypah',title='ypah_vs_ypah_mathis'
    cgoplot, x_range, x_range,linesyle=2,color='red'
    cgplot,result_mathis.Yg1_map,result.Yg1_map,/xlog,/ylog,xr=x_range,yr=y_range,/xsty,psym=3,xtit='Yg1_mathis',ytit='Yg1',title='yg1_vs_yg1_mathis'
    cgoplot, x_range, x_range,linesyle=2,color='red'
    cgplot,result_mathis.Yg2_map,result.Yg2_map,/xlog,/ylog,xr=x_range,yr=y_range,/xsty,psym=3,xtit='Yg2_mathis',ytit='Yg2',title='yg2_vs_yg2_mathis'
    cgoplot, x_range, x_range,linesyle=2,color='red'
    cgplot,result_mathis.Yg3_map,result.Yg3_map,/xlog,/ylog,xr=x_range,yr=y_range,/xsty,psym=3,xtit='Yg3_mathis',ytit='Yg3',title='yg3_vs_yg3_mathis'
    cgoplot, x_range, x_range,linesyle=2,color='red'
    								    						    
ENDIF

the_end:

END