Commit cd0dc4549a1e93b0c159144244e42d44faac8bc3

Authored by Jean-Philippe Bernard
1 parent 2a89c8d9
Exists in master

improved

LabTools/IRAP/JPB/phangs_brute_force_fit_with_isrf_grid.pro
... ... @@ -977,6 +977,23 @@ ENDIF
977 977  
978 978 from_restore:
979 979  
  980 +;Below could be replaced by a call to
  981 +; phangs_make_figures_from_restore,source_name=source_name $
  982 +; ,model=model $
  983 +; ,normalize=normalize $
  984 +; ,force_mathis=force_mathis $
  985 +; ,fit_G0=fit_G0 $
  986 +; ,set_yvsg=set_yvsg $
  987 +; ,help=help $
  988 +; ,resolution_filter=resolution_filter $
  989 +; ,resolution_value=resolution_value $
  990 +; ,table_name_root=table_name_root $
  991 +; ,nostop=nostop $
  992 +; ,marginalize_method=marginalize_method $
  993 +; ,do_postscripts=do_postscripts $
  994 +; ,postscripts_dir=postscripts_dir $
  995 +; ,silent=silent
  996 +
980 997 IF not keyword_set(fit_G0) THEN BEGIN
981 998 fit_G0_str='_GOfixed'
982 999 ENDIF ELSE BEGIN
... ... @@ -1199,7 +1216,7 @@ ENDIF
1199 1216 ;=== make an overlay with contours of the total NH
1200 1217 ;=== We smooth the NH map to 5 arcesec, or else, too many contours are shown.
1201 1218 IF reso LE 5./60.^2 THEN BEGIN
1202   - use_NHmap=degrade_res(NHmap,href,reso,5./60.^2,hout)
  1219 + use_NHmap=degrade_res(NHmap,href,reso,5./60.^2,hout) ;in 1.e21 H/cm2
1203 1220 use_NHmap=project2(hout,use_NHmap,href,/silent)
1204 1221 ENDIF ELSE BEGIN
1205 1222 use_NHmap=NHmap
... ... @@ -1220,6 +1237,37 @@ cont_st.(0).thick=2.
1220 1237 cont_st.(1).color=100
1221 1238 cont_st.(1).thick=1.0
1222 1239  
  1240 +;===== get HII region mask
  1241 +obj_name=strupcase(source_name)
  1242 +IF obj_name EQ 'NGC0628' THEN obj_name='NGC628'
  1243 +dir=!phangs_data_dir+'/phangs_drive/Archive/Products/Nebulae_catalogs/Nebulae_catalogue_v1/spatial_masks/'
  1244 +file=dir+obj_name+'_HIIreg_mask.fits'
  1245 +hii=readfits(file,hhii)
  1246 +ind=where(finite(hii) NE 1,count)
  1247 +IF count NE 0 THEN hii[ind]=la_undef()
  1248 +hhii=cd2astro_header(hhii)
  1249 +sxaddpar,hhii,'EQUINOX',2000.
  1250 +image_cont20,hii,hhii,/square,/silent
  1251 +hii=project2(hhii,hii,href,/silent)
  1252 +image_cont20,hii,href,/square,/silent
  1253 +is_hii=hii
  1254 +ind=where(hii NE 0 and hii NE la_undef(),count)
  1255 +is_hii[ind]=1
  1256 +;stop
  1257 +hii_m=fltarr(Nx,Ny,2)
  1258 +hii_m[*,*,0]=is_hii
  1259 +hii_m[*,*,1]=is_hii
  1260 +levs_HII=[0.5,1]
  1261 +hii_st=create_contour_st(hii_m,lev1=levs_HII,lev2=levs_HII)
  1262 +hii_st.(0).color=0
  1263 +hii_st.(0).thick=2.
  1264 +hii_st.(1).color=100
  1265 +hii_st.(1).thick=1.0
  1266 +;hii[*]=la_undef()
  1267 +image_cont20,hii,href,/square,/silent,levels=hii_st,image_color_table='jpbloadct',axis_color_table=1,off_bar=obp
  1268 +image_cont20,is_hii,href,/square,/silent,levels=hii_st,image_color_table='jpbloadct',axis_color_table=1
  1269 +
  1270 +;stop
1223 1271  
1224 1272 ;===== plot nhits vs isrf_class
1225 1273 Ncl=n_elements(stats_st)
... ... @@ -1542,6 +1590,13 @@ IF keyword_set(do_postscripts) THEN BEGIN
1542 1590 postscript=ps_file,orientation='portrait',/nologo
1543 1591 message,'Wrote '+ps_file,/continue
1544 1592 ENDIF
  1593 +stop
  1594 +
  1595 +window,win,xsize=800,ysize=900 & win=win+1
  1596 +imrange=[-1.,+1.0]
  1597 +title='log10(G0)'
  1598 +image_cont20,la_log10(G0_map),Href,/square,imrange=imrange,axis_color_table=1,image_color_table=image_color_table,/silent,off_bar=obp,title=title,levels=hii_st
  1599 +image_cont20,hii,Href,/square,imrange=imrange,axis_color_table=1,image_color_table=image_color_table,/silent,off_bar=obp,title=title,levels=hii_st
1545 1600  
1546 1601 window,win,xsize=800,ysize=900 & win=win+1
1547 1602 imrange=[-1.,+1.0]
... ...
LabTools/IRAP/JPB/phangs_isrf_pipeline.pro
... ... @@ -565,6 +565,8 @@ phangs_make_herschel_images,source_name='ngc0628',/save,/show,/nostop,resolution
565 565  
566 566 phangs_make_muse_filters_data,source_name='ngc0628',/save,/show,/nostop,resolution_value=1./60.^2
567 567  
  568 +phangs_make_intensity_mask,source_name='ngc0628',resolution_value=1./60.^2,/show,/save
  569 +
568 570 ;This took 3 days on my mac ...
569 571 phangs_extract_seds,source_name='ngc0628',resolution_value=1./60.^2
570 572  
... ... @@ -600,6 +602,13 @@ phangs_brute_force_fit_with_isrf_grid,model='DL07',source_name='ngc0628',/normal
600 602 ,/nostop,table_name_root=table_name_root $
601 603 ,/from_restore,/do_postscripts,postscripts_dir=postscripts_dir
602 604  
  605 +;same as above, doing postscripts, using hangs_make_figures_from_restore
  606 +table_name_root='_logn_MuseISRF_JWST_adaptedG0_Ypah1added_Yvsgadded_4Phangs_noionis_F0upext'
  607 +postscripts_dir=!phangs_data_dir+'/ISRF/WORK/PS/ngc0628_1arcsec_B1_NEAREST'
  608 +phangs_make_figures_from_restore,model='DL07',source_name='ngc0628',/normalize,fit_G0=1,set_yvsg=1,resolution_value=1./60.^2 $
  609 + ,/nostop,table_name_root=table_name_root $
  610 + ,/do_postscripts,postscripts_dir=postscripts_dir
  611 +
603 612 ;======== test
604 613 ;ngc0628_1arcsec_B1_NEAREST (1arcsec_B1_NEAREST)
605 614 table_name_root='_logn_MuseISRF_JWST_adaptedG0_Ypah1added_Yvsgadded_4Phangs_noionis_F0upext' ;rem: They also have YPAH0 added ....
... ...