Commit b0ee86723a5c73b8e4db77248f10550673f2f21c

Authored by Jean-Philippe Bernard
1 parent 78db85de
Exists in master

improved

LabTools/IRAP/JPB/phangs_brute_force_fit_with_isrf_grid.pro
... ... @@ -788,27 +788,27 @@ FOR isrf_class=class_min,class_max DO BEGIN ;isrf_class runs from 1
788 788 ;stop
789 789 Ygrain1[vid]=weighted_params[1];/fact ;Caution, extenssive quantities must be divided by normalization factor. We don't here
790 790 ;=== below is if PAH+ are in the table
791   - ;Ygrain2[vid]=weighted_params[2];/fact
792   - ;Ygrain3[vid]=weighted_params[3];/fact
  791 + Ygrain2[vid]=weighted_params[2];/fact
  792 + Ygrain3[vid]=weighted_params[3];/fact
793 793 ;=== below is if PAH+ are NOT in the table
794   - Ygrain3[vid]=weighted_params[2];/fact
  794 + ;Ygrain3[vid]=weighted_params[2];/fact
795 795 facts[vid]=fact
796 796 chi2s[vid]=chi2
797 797 rchi2s[vid]=rchi2
798 798 F0_hit[vid]=params_hit[0]
799 799 Ygrain1_hit[vid]=params_hit[1]
800 800 ;=== below is if PAH+ are in the table
801   - ;Ygrain2_hit[vid]=params_hit[2]
802   - ;Ygrain3_hit[vid]=params_hit[3]
  801 + Ygrain2_hit[vid]=params_hit[2]
  802 + Ygrain3_hit[vid]=params_hit[3]
803 803 ;=== below is if PAH+ are NOT in the table
804   - Ygrain3_hit[vid]=params_hit[2]
  804 + ;Ygrain3_hit[vid]=params_hit[2]
805 805 dF0s[vid]=0. ;should use difference between fixed param and nearest table neighbor
806 806 dYgrain1[vid]=params_uncertainties[0]/fact ;extenssive quantities must be devided by normalization factor
807 807 ;=== below is if PAH+ are in the table
808   - ;dYgrain2[vid]=params_uncertainties[1]/fact
809   - ;dYgrain3[vid]=params_uncertainties[2]/fact
  808 + dYgrain2[vid]=params_uncertainties[1]/fact
  809 + dYgrain3[vid]=params_uncertainties[2]/fact
810 810 ;=== below is if PAH+ are NOT in the table
811   - dYgrain3[vid]=params_uncertainties[1]/fact
  811 + ;dYgrain3[vid]=params_uncertainties[1]/fact
812 812 ;print,params[0],params[1],params[2],fact,chi2
813 813 ENDIF ELSE BEGIN
814 814 message,'dustem_brute_force_fit status ='+strtrim(status,2),/continue
... ... @@ -1102,9 +1102,13 @@ ENDIF
1102 1102  
1103 1103 ;=== make an overlay with contours of the total NH
1104 1104 ;=== We smooth the NH map to 5 arcesec, or else, too many contours are shown.
1105   -use_NHmap=degrade_res(NHmap,href,reso,5./60.^2,hout)
1106   -use_NHmap=project2(hout,use_NHmap,href,/silent)
1107   -levs=[la_undef()-1,-0.5,-0.25,0.,0.25,0.5,0.75,1.]
  1105 +IF reso LE 5./60.^2 THEN BEGIN
  1106 + use_NHmap=degrade_res(NHmap,href,reso,5./60.^2,hout)
  1107 + use_NHmap=project2(hout,use_NHmap,href,/silent)
  1108 +ENDIF ELSE BEGIN
  1109 + use_NHmap=NHmap
  1110 +ENDELSE
  1111 +levs=[la_undef(),-0.5,-0.25,0.,0.25,0.5,0.75,1.]
1108 1112 ;levs=[-0.5,-0.25,0.,0.25,0.5,0.75,1.]
1109 1113 NNHmap=fltarr(Nx,Ny,2)
1110 1114 NNHmap[*,*,0]=la_log10(use_NHmap)
... ... @@ -1240,11 +1244,11 @@ ind=where(Ygrain3 NE la_undef(),count3)
1240 1244 IF count3 NE 0 THEN BEGIN
1241 1245 default_value=dustem_get_param_values_default('(*!dustem_params).grains[2].MDUST_O_MH')
1242 1246 ;=== IF PAH+ are in table
1243   - ;parval_min=((*!dustem_grid).PMIN_VALUES)[3]
1244   - ;parval_max=((*!dustem_grid).PMAX_VALUES)[3]
  1247 + parval_min=((*!dustem_grid).PMIN_VALUES)[3]
  1248 + parval_max=((*!dustem_grid).PMAX_VALUES)[3]
1245 1249 ;=== IF PAH+ are not in table
1246   - parval_min=((*!dustem_grid).PMIN_VALUES)[2]
1247   - parval_max=((*!dustem_grid).PMAX_VALUES)[2]
  1250 + ;parval_min=((*!dustem_grid).PMIN_VALUES)[2]
  1251 + ;parval_max=((*!dustem_grid).PMAX_VALUES)[2]
1248 1252 ;xrange=alog10([default_value/range_fact,default_value*range_fact])
1249 1253 xrange=enlarge_range(alog10([parval_min,parval_max]),0.1)
1250 1254 yrange=[1,max(res)]
... ... @@ -1362,7 +1366,7 @@ IF keyword_set(do_postscripts) THEN BEGIN
1362 1366 postscript=ps_file,orientation='portrait'
1363 1367 message,'Wrote '+ps_file,/continue
1364 1368 ENDIF
1365   -;stop
  1369 +stop
1366 1370  
1367 1371 window,win,xsize=800,ysize=900 & win=win+1
1368 1372 imrange=1.+[-0.5,+0.5]
... ...
LabTools/IRAP/JPB/phangs_isrf_pipeline.pro
... ... @@ -47,13 +47,9 @@ make_phangs_isrf_classes,bidon,source_name='ngc0628',/do_postscripts
47 47 ;make_sed_phangs_tables,/test,/show_seds ;test of plugin dustem_plugin_phangs_class_isrf.pro
48 48 ;Generally very long. Do it using nohup (see make_phangs_grid.pro)
49 49 make_sed_phangs_tables,grid_type=223,isrf_class=15,/test
50   -make_sed_phangs_tables,grid_type=222,isrf_class=14
51   -make_sed_phangs_tables,grid_type=222,isrf_class=13
52   -make_sed_phangs_tables,grid_type=222,isrf_class=12
53 50 ;...
54 51 FOR i=4L,26 DO make_sed_phangs_tables,grid_type=223,isrf_class=i
55   -FOR i=16L,26 DO make_sed_phangs_tables,grid_type=222,isrf_class=i
56   -make_sed_phangs_tables,grid_type=222,isrf_class=0
  52 +make_sed_phangs_tables,grid_type=223,isrf_class=0
57 53  
58 54 ;=== Fit the SEDs with the ISRF Grids
59 55 table_name_root='_MuseISRF_JWST_adaptedG0_Ypah1added_Ypah2added_adaptedYvsgadded_4Phangs_noionis'
... ... @@ -124,13 +120,15 @@ make_phangs_isrf_classes,bidon,source_name='ngc0628',/save,resolution_filter='PA
124 120  
125 121 ;===test new tables
126 122 dustem_init
127   -table_name_root='_orig_MuseISRF_JWST_adaptedG0_Ypah1added_Yvsgadded_4Phangs_noionis'
128   -class_min_max=[12,15]
129   -phangs_brute_force_fit_with_isrf_grid,model='DL07',source_name='ngc0628',/include_herschel,/normalize,/fit_G0,/save,resolution_filter='PACS3' $
130   - ,/subtract_star_light,/show,/nostop,table_name_root=table_name_root,class_min_max=class_min_max
  123 +;table_name_root='_orig_MuseISRF_JWST_adaptedG0_Ypah1added_Yvsgadded_4Phangs_noionis'
  124 +table_name_root='_logn_MuseISRF_JWST_adaptedG0_Ypah1added_Yvsgadded_4Phangs_noionis' ;rem: They also have YPAH0 added ....
  125 +class_min_max=[15,20]
  126 +phangs_brute_force_fit_with_isrf_grid,model='DL07',source_name='ngc0628',/include_herschel,/normalize,/fit_G0,resolution_filter='PACS3' $
  127 + ,/subtract_star_light,/show,/nostop,table_name_root=table_name_root,class_min_max=class_min_max,/save
131 128  
132 129  
133   -table_name_root='_MuseISRF_JWST_adaptedG0_Ypah1added_Ypah2added_adaptedYvsgadded_4Phangs_noionis'
  130 +;table_name_root='_MuseISRF_JWST_adaptedG0_Ypah1added_Ypah2added_adaptedYvsgadded_4Phangs_noionis'
  131 +table_name_root='_logn_MuseISRF_JWST_adaptedG0_Ypah1added_Yvsgadded_4Phangs_noionis' ;rem: They also have YPAH0 added ....
134 132 class_min_max=0
135 133 phangs_brute_force_fit_with_isrf_grid,model='DL07',source_name='ngc0628',/include_herschel,/normalize,/fit_G0,/save,resolution_filter='PACS3' $
136 134 ,/subtract_star_light,/show,/nostop,table_name_root=table_name_root,class_min_max=class_min_max
... ...
LabTools/IRAP/JPB/srun/make_phangs_grids.pro
... ... @@ -19,8 +19,8 @@ t0=systime(/sec)
19 19 bidon=1
20 20  
21 21 ;make_sed_phangs_tables,grid_type=221,isrf_class=0 ;alma1 (For Mathis field)
22   -;FOR i=5L,26 DO make_sed_phangs_tables,grid_type=221,isrf_class=i ;alma1 (For grid ISRF field)
23   -FOR i=5L,26 DO make_sed_phangs_tables,grid_type=223,isrf_class=i ;This is to compute DL07 with logn keyword for both PAH0 and PAH1
  22 +;FOR i=5L,26 DO make_sed_phangs_tables,grid_type=223,isrf_class=i ;This is to compute DL07 with logn keyword for both PAH0 and PAH1
  23 +make_sed_phangs_tables,grid_type=223,isrf_class=0 ;Mathis
24 24  
25 25 ;make grid
26 26 ;=== This is DL07 model single G0s
... ...