Commit 3b79f0616e324ec75232a79d47ac05a23a1376b7
1 parent
2adbba75
Exists in
master
improved
Showing
3 changed files
with
98 additions
and
89 deletions
Show diff stats
LabTools/IRAP/JPB/make_sed_phangs_tables.pro
1 | -PRO make_sed_phangs_tables,test=test,show_seds=show_seds | |
1 | +PRO make_sed_phangs_tables,test=test,show_seds=show_seds,grid_type=grid_type,isrf_class=isrf_class | |
2 | 2 | |
3 | 3 | ;make_sed_phangs_tables |
4 | -;make_sed_phangs_tables,/test,/show_seds | |
4 | +;make_sed_phangs_tables,/test,grid_type=2,/show_seds,isrf_class=15 | |
5 | 5 | |
6 | 6 | ;=== This is needed for Phangs work |
7 | 7 | ;defsysv,'!phangs_data_dir','/Volumes/PILOT_FLIGHT1/PHANGS/' |
... | ... | @@ -12,90 +12,94 @@ dir=!phangs_data_dir+'/ISRF/GRIDS/' |
12 | 12 | |
13 | 13 | dustem_define_la_common |
14 | 14 | |
15 | -use_grid='grid2' | |
15 | +use_grid_type=1 | |
16 | +IF keyword_set(grid_type) THEN BEGIN | |
17 | + use_grid_type=grid_type | |
18 | +ENDIF | |
19 | + | |
20 | +CASE use_grid_type OF | |
21 | + 1: BEGIN ;======= This is to produce a grid with the DBP90 model for G0 and PAH abundance | |
22 | + | |
23 | + !quiet=1 | |
24 | + model='DBP90' | |
25 | + | |
26 | + ;===== This is to do a small test_table | |
27 | + pd = [ $ | |
28 | + '(*!dustem_params).G0', $ ;G0 | |
29 | + '(*!dustem_params).grains(0).mdust_o_mh',$ ;PAH0 mass fraction | |
30 | + '(*!dustem_params).grains(1).mdust_o_mh'] ;VSG mass fraction | |
31 | + | |
32 | + iv_min = [0.1,1.e-4,1.e-4] | |
33 | + iv_max = [100,1.e-1,1.e-1] | |
34 | + log=[1,1,1] | |
35 | + | |
36 | + fpd=[] | |
37 | + fiv=[] | |
38 | + | |
39 | + IF keyword_set(test) THEN BEGIN | |
40 | + iv_Nvalues=[5,3,3] | |
41 | + table_name=dir+'TEST_DBP90_JWST_G0_YPAH_YVSG_4Phangs.fits' | |
42 | + ENDIF ELSE BEGIN | |
43 | + iv_Nvalues=[50,20,20] | |
44 | + table_name=dir+'DBP90_JWST_G0_YPAH_YVSG_4Phangs.fits' | |
45 | + ENDELSE | |
46 | + | |
47 | + dustem_init,model=model | |
48 | + ;=== select filters to be used for the grid | |
49 | + filters=[(*!dustem_filters).nircam.filter_names,(*!dustem_filters).miri.filter_names] | |
50 | + | |
51 | + dustem_make_sed_table,model,pd,iv_min,iv_max,iv_Nvalues,fpd=fpd,fiv=fiv,filename=table_name,filters=filters,log=log,show_seds=show_seds | |
52 | + END | |
53 | + 2: BEGIN | |
54 | + !quiet=1 | |
55 | + model='DBP90' | |
56 | + | |
57 | + ;======= This is to produce a grid with the DL07 model for G0 and PAH abundance and ISRF from Muse data | |
58 | + pd = [ $ | |
59 | + 'dustem_plugin_phangs_class_isrf_2', $ ;G0 factor for Phangs ISRF classes | |
60 | + '(*!dustem_params).grains(0).mdust_o_mh',$ ;PAH0 mass fraction | |
61 | + '(*!dustem_params).grains(1).mdust_o_mh'] ;VSG mass fraction | |
62 | + iv_min = [0.1,1.e-4,1.e-4] | |
63 | + iv_max = [100,1.e-1,1.e-1] | |
64 | + log=[1,1,1] | |
65 | + | |
66 | + show_seds=1 | |
67 | + Nclass=31L | |
68 | + fpd=['(*!dustem_params).gas.g0','(*!dustem_params).g0','dustem_plugin_phangs_class_isrf_1'] ;ISRF class to be used | |
69 | + dustem_init,model=model | |
70 | + ;=== select filters to be used for the grid | |
71 | + filters=[(*!dustem_filters).nircam.filter_names,(*!dustem_filters).miri.filter_names, $ | |
72 | + (*!dustem_filters).pacs.filter_names,(*!dustem_filters).spire.filter_names] | |
73 | + IF keyword_set(isrf_class) THEN BEGIN ;do just one table | |
74 | + i=isrf_class | |
75 | + fiv=[-1.,1.,i] | |
76 | + isrf_class_str='_isrfclass'+strtrim(i,2) | |
77 | + IF keyword_set(test) THEN BEGIN | |
78 | + iv_Nvalues=[5,3,3] | |
79 | + table_name=dir+'TEST_DBP90_MuseISRF_JWST_G0_YPAH_YVSG_4Phangs'+isrf_class_str+'.fits' | |
80 | + ENDIF ELSE BEGIN | |
81 | + iv_Nvalues=[50,20,20] | |
82 | + table_name=dir+'DBP90_MuseISRF_JWST_G0_YPAH_YVSG_4Phangs'+isrf_class_str+'.fits' | |
83 | + ENDELSE | |
84 | + dustem_make_sed_table,model,pd,iv_min,iv_max,iv_Nvalues,fpd=fpd,fiv=fiv,filename=table_name,filters=filters,log=log,show_seds=show_seds,isrf_class=i,/use_isrf_class | |
85 | + ENDIF ELSE BEGIN | |
86 | + FOR i=0L,Nclass-1 DO BEGIN ;do all tables (could take a long time) | |
87 | + fiv=[-1.,1.,i] | |
88 | + isrf_class_str='_isrfclass'+strtrim(i,2) | |
89 | + IF keyword_set(test) THEN BEGIN | |
90 | + iv_Nvalues=[5,3,3] | |
91 | + table_name=dir+'TEST_DBP90_MuseISRF_JWST_G0_YPAH_YVSG_4Phangs'+isrf_class_str+'.fits' | |
92 | + ENDIF ELSE BEGIN | |
93 | + iv_Nvalues=[50,20,20] | |
94 | + table_name=dir+'DBP90_MuseISRF_JWST_G0_YPAH_YVSG_4Phangs'+isrf_class_str+'.fits' | |
95 | + ENDELSE | |
96 | + ;dustem_init,model=model | |
97 | + dustem_make_sed_table,model,pd,iv_min,iv_max,iv_Nvalues,fpd=fpd,fiv=fiv,filename=table_name,filters=filters,log=log,show_seds=show_seds,isrf_class=i,/use_isrf_class | |
98 | + ENDFOR | |
99 | + ENDELSE | |
100 | + END | |
101 | +ENDCASE | |
16 | 102 | |
17 | -IF use_grid EQ 'grid1' THEN goto,grid1 | |
18 | -IF use_grid EQ 'grid2' THEN goto,grid2 | |
19 | - | |
20 | -;======= This is to produce a grid with the DBP90 model for G0 and PAH abundance | |
21 | -grid1: | |
22 | - | |
23 | -!quiet=1 | |
24 | -model='DBP90' | |
25 | - | |
26 | -;===== This is to do a small test_table | |
27 | -pd = [ $ | |
28 | - '(*!dustem_params).G0', $ ;G0 | |
29 | - '(*!dustem_params).grains(0).mdust_o_mh',$ ;PAH0 mass fraction | |
30 | - '(*!dustem_params).grains(1).mdust_o_mh'] ;VSG mass fraction | |
31 | - | |
32 | -iv_min = [0.1,1.e-4,1.e-4] | |
33 | -iv_max = [100,1.e-1,1.e-1] | |
34 | -log=[1,1,1] | |
35 | - | |
36 | -fpd=[] | |
37 | -fiv=[] | |
38 | - | |
39 | -IF keyword_set(test) THEN BEGIN | |
40 | - iv_Nvalues=[5,3,3] | |
41 | - table_name=dir+'TEST_DBP90_JWST_G0_YPAH_YVSG_4Phangs.fits' | |
42 | -ENDIF ELSE BEGIN | |
43 | - iv_Nvalues=[50,20,20] | |
44 | - table_name=dir+'DBP90_JWST_G0_YPAH_YVSG_4Phangs.fits' | |
45 | -ENDELSE | |
46 | - | |
47 | -dustem_init,model=model | |
48 | -;=== select filters to be used for the grid | |
49 | -filters=[(*!dustem_filters).nircam.filter_names,(*!dustem_filters).miri.filter_names] | |
50 | - | |
51 | -dustem_make_sed_table,model,pd,iv_min,iv_max,iv_Nvalues,fpd=fpd,fiv=fiv,filename=table_name,filters=filters,log=log,show_seds=show_seds | |
52 | - | |
53 | -goto,the_end | |
54 | - | |
55 | -grid2: | |
56 | - | |
57 | -!quiet=1 | |
58 | -model='DBP90' | |
59 | - | |
60 | -;======= This is to produce a grid with the DL07 model for G0 and PAH abundance and ISRF from Muse data | |
61 | -pd = [ $ | |
62 | - 'dustem_plugin_phangs_class_isrf_2', $ ;G0 factor for Phangs ISRF classes | |
63 | - '(*!dustem_params).grains(0).mdust_o_mh',$ ;PAH0 mass fraction | |
64 | - '(*!dustem_params).grains(1).mdust_o_mh'] ;VSG mass fraction | |
65 | -iv_min = [0.1,1.e-4,1.e-4] | |
66 | -iv_max = [100,1.e-1,1.e-1] | |
67 | -log=[1,1,1] | |
68 | - | |
69 | -;fpd=['*!dustem_params.gas.g0','*!dustem_params.g0','dustem_plugin_phangs_class_isrf_1'] ;ISRF class to be used | |
70 | -;fiv=[-1.,1.e-13,isrf_class] | |
71 | - | |
72 | -!quiet=1 | |
73 | -show_seds=1 | |
74 | -Nclass=31L | |
75 | -FOR isrf_class=0L,Nclass-1 DO BEGIN | |
76 | - ;isrf_class=29L ;This is for ISRF class | |
77 | - fpd=['(*!dustem_params).gas.g0','(*!dustem_params).g0','dustem_plugin_phangs_class_isrf_1'] ;ISRF class to be used | |
78 | - fiv=[-1.,1.,isrf_class] | |
79 | - | |
80 | - isrf_class_str='_isrfclass'+strtrim(isrf_class,2) | |
81 | - IF keyword_set(test) THEN BEGIN | |
82 | - iv_Nvalues=[5,3,3] | |
83 | - table_name=dir+'TEST_DBP90_MuseISRF_JWST_G0_YPAH_YVSG_4Phangs'+isrf_class_str+'.fits' | |
84 | - ENDIF ELSE BEGIN | |
85 | - iv_Nvalues=[50,20,20] | |
86 | - table_name=dir+'DBP90_MuseISRF_JWST_G0_YPAH_YVSG_4Phangs'+isrf_class_str+'.fits' | |
87 | - ENDELSE | |
88 | - | |
89 | - dustem_init,model=model | |
90 | - ;=== select filters to be used for the grid | |
91 | - filters=[(*!dustem_filters).nircam.filter_names,(*!dustem_filters).miri.filter_names, $ | |
92 | - (*!dustem_filters).pacs.filter_names,(*!dustem_filters).spire.filter_names] | |
93 | - | |
94 | - dustem_make_sed_table,model,pd,iv_min,iv_max,iv_Nvalues,fpd=fpd,fiv=fiv,filename=table_name,filters=filters,log=log,show_seds=show_seds,isrf_class=isrf_class,/use_isrf_class | |
95 | - | |
96 | -ENDFOR | |
97 | - | |
98 | -stop | |
99 | 103 | |
100 | 104 | the_end: |
101 | 105 | ... | ... |
LabTools/IRAP/JPB/phangs_isrf_pipeline.pro
... | ... | @@ -3,8 +3,13 @@ PRO phangs_isrf_pipeline |
3 | 3 | |
4 | 4 | ;PHANGS ISRF pipeline |
5 | 5 | |
6 | +plot_phangs_ssps_against_uv_fast | |
7 | + | |
6 | 8 | make_phangs_ssps_isrf_prediction,source_name='ngc0628',/save |
7 | 9 | make_phangs_isrf_classes,/save |
8 | -make_sed_phangs_tables,/test,/show_seds ;test of plugin dustem_plugin_phangs_class_isrf.pro | |
10 | +check_phangs_ssps_isrf_prediction | |
11 | + | |
12 | +;make_sed_phangs_tables,/test,/show_seds ;test of plugin dustem_plugin_phangs_class_isrf.pro | |
13 | +make_sed_phangs_tables,/test,grid_type=2,/show_seds,isrf_class=15 | |
9 | 14 | |
10 | 15 | END | ... | ... |
src/idl/dustem_make_sed_table.pro
... | ... | @@ -251,9 +251,9 @@ FOR i=0L,Nc-1 DO BEGIN |
251 | 251 | ENDFOR |
252 | 252 | |
253 | 253 | ;======== save SED tables |
254 | -use_sed_outfile='/tmp/dustem_seds.xcat' | |
255 | -write_xcat,seds_array,use_sed_outfile | |
256 | -message,'Wrote '+use_sed_outfile,/continue | |
254 | +;use_sed_outfile='/tmp/dustem_seds.xcat' | |
255 | +;write_xcat,seds_array,use_sed_outfile | |
256 | +;message,'Wrote '+use_sed_outfile,/continue | |
257 | 257 | |
258 | 258 | fits_file='/tmp/dustem_seds.fits' |
259 | 259 | IF keyword_set(filename) THEN fits_file=filename | ... | ... |