phangs_isrf_pipeline.pro
7.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
PRO phangs_isrf_pipeline
;PHANGS ISRF pipeline
save_data_dir=!phangs_data_dir+'/ISRF/WORK/'
str='ls '+save_data_dir+'ngc0628_*SPIRE3.sav'
print,str
str='ls '+save_data_dir+'ngc0628_*images*.sav'
spawn,str
str='ls '+save_data_dir+'ngc0628_*seds_muse_pixels*.sav'
spawn,str
;==== make sky images
;produces _jwst_images.sav and _ref_header.sav
;/data/projects/phangs/phangs_drive/Archive/PHANGS_JWST/DR1/ngc0628/f1000w_psf_matched
phangs_make_jwst_images,source_name='ngc0628',/save,/show,/nostop
;produces _muse_filters_images.sav,_muse_data.sav, _muse_NH.sav
phangs_make_muse_filters_images,source_name='ngc0628',/save,/show,/nostop
;produces _astrosat_images.sav
phangs_make_astrosat_images,source_name='ngc0628',/save,/show,/nostop
;produces _herschel_images.sav
phangs_make_herschel_images,source_name='ngc0628',/save,/show,/nostop
;produces _HI_images.sav
phangs_make_hi_images,source_name='ngc0628',/save,/show,/nostop
;produces _CO_images.sav
phangs_make_co_images,source_name='ngc0628',/save,/show,/nostop
;produces _muse_data.sav,
phangs_make_muse_filters_data,source_name='ngc0628',/save,/show,/nostop
;==== extract SEDs on MUSE pixels
;produces _jwst_seds_muse_pixels.sav, _muse_seds_muse_pixels.sav', _astrosat_seds_muse_pixels.sav
;pointer for vid 40749, 41095, 41405, 41406, 41581 .... is not referenced in all_seds_indices
phangs_extract_seds,source_name='ngc0628'
;=== Compute ISRF prediction. This is done only at full resolution
;=== produce _isrf_min_prediction.sav, _isrf_min_prediction.fits (product)
make_phangs_ssps_isrf_prediction,source_name='ngc0628',/save
;==== Make isrf classes
;produces isrf_classes_one_ratio_on_*.fits, *_isrf_classes_map.fits, *_isrf_classes_voronoi.sav
make_phangs_isrf_classes,bidon,source_name='ngc0628',/save
;===== j'en suis la sur mon mac
;=== Fit the SEDs with the ISRF Grids
phangs_brute_force_fit_with_isrf_grid,source_name='ngc0628',/include_herschel,/normalize,/fit_G0,/save
phangs_brute_force_fit_with_isrf_grid,source_name='ngc0628',/include_herschel,/normalize,/fit_G0,/from_restore
plot_phangs_ssps_against_uv_fast,bidon
;==== Check the classes and do a plot
;==== produce ngc0682_isrf_classes_one_ratio.sav
;==== requires : ngc0628_astrosat_voronoi_prediction_fast.sav
check_phangs_ssps_isrf_prediction,/show_map
;fit_phangs_ngc0628_nir_continuum,/from_restore,/show_plots ;fit seds of some voronoi bins
;fit_phangs_ngc0628_nir_continuum,/from_restore,/brute_force
;fit_phangs_ngc0628_nir_continuum,/from_restore,/grid_brute_force
;=== Compute ISRF prediction. This is done only at full resolution
make_phangs_ssps_isrf_prediction,source_name='ngc0628',/save
check_phangs_ssps_isrf_prediction
;==== Make isrf classes
make_phangs_isrf_classes,bidon,source_name='ngc0628',/fits
;make_sed_phangs_tables,/test,/show_seds ;test of plugin dustem_plugin_phangs_class_isrf.pro
;Generally very long. Do it using nohup (see make_phangs_grid.pro)
make_sed_phangs_tables,grid_type=2,isrf_class=15
make_sed_phangs_tables,grid_type=2,isrf_class=0
;...
;=== had to convert previous grids like this:
convert_all_grid_tables_from_v1_to_v2
;=== Fit the SEDs with the ISRF Grids
phangs_brute_force_fit_with_isrf_grid,source_name='ngc0628',/include_herschel,/normalize,/fit_G0,/save
phangs_brute_force_fit_with_isrf_grid,source_name='ngc0628',/include_herschel,/normalize,/fit_G0,/from_restore
;============================================================================================================
;===== NGC0628 at SPIRE3 resolution
;============================================================================================================
;resolution_filter='SPIRE3'
;ngc0628_jwst_images_SPIRE3.sav, ngc0628_ref_header_SPIRE3.sav
phangs_make_jwst_images,source_name='ngc0628',/save,/show,/nostop,resolution_filter='SPIRE3'
;ngc0628_CO_images_SPIRE3.sav
phangs_make_co_images,source_name='ngc0628',/save,/show,/nostop,resolution_filter='SPIRE3'
;ngc0628_HI_images_SPIRE3.sav
phangs_make_hi_images,source_name='ngc0628',/save,/show,/nostop,resolution_filter='SPIRE3'
;ngc0628_astrosat_data_SPIRE3.sav
phangs_make_astrosat_images,source_name='ngc0628',/save,/show,/nostop,resolution_filter='SPIRE3'
;ngc0628_muse_filters_data_SPIRE3.sav, ngc0628_muse_images_SPIRE3.sav (not produced _muse_NH_SPIRE3.sav)
phangs_make_muse_filters_images,source_name='ngc0628',/save,/show,/nostop,resolution_filter='SPIRE3'
;ngc0628_herschel_images_SPIRE3.sav
phangs_make_herschel_images,source_name='ngc0628',/save,/show,/nostop,resolution_filter='SPIRE3'
phangs_make_muse_filters_data,source_name='ngc0628',/save,/show,/nostop,resolution_filter='SPIRE3'
;ngc0628_jwst_seds_muse_pixels_SPIRE3.sav,ngc0628_seds_indices_SPIRE3.sav,ngc0628_muse_seds_muse_pixels_SPIRE3.sav
;ngc0628_astrosat_seds_muse_pixels_SPIRE3.sav,ngc0628_herschel_seds_muse_pixels_SPIRE3.sav,ngc0628_all_seds_muse_pixels_SPIRE3.sav
phangs_extract_seds,source_name='ngc0628',resolution_filter='SPIRE3',/reset_seds
;ngc0628_isrf_min_prediction_SPIRE3.sav
phangs_smooth_muse_isrf,'ngc0628',resolution_filter='SPIRE3',/save
;isrf_classes_one_ratio_on_ngc0628_SPIRE3.fits,ngc0628_isrf_classes_map_SPIRE3.fits,ngc0628_isrf_classes_voronoi_SPIRE3.sav
make_phangs_isrf_classes,bidon,source_name='ngc0628',/fits,resolution_filter='SPIRE3'
;J'en SUIS LA
phangs_brute_force_fit_with_isrf_grid,source_name='ngc0628',/include_herschel,/normalize,/fit_G0,/save,resolution_filter='SPIRE3'
;J'en SUIS LA
phangs_make_jwst_images,source_name='ngc0628',/save,/show,/nostop,resolution_filter='PACS3'
phangs_make_co_images,source_name='ngc0628',/save,/show,/nostop,resolution_filter='PACS3'
phangs_make_hi_images,source_name='ngc0628',/save,/show,/nostop,resolution_filter='PACS3'
phangs_make_astrosat_images,source_name='ngc0628',/save,/show,/nostop,resolution_filter='PACS3'
phangs_make_muse_filters_images,source_name='ngc0628',/save,/show,/nostop,resolution_filter='PACS3'
phangs_make_herschel_images,source_name='ngc0628',/save,/show,/nostop,resolution_filter='PACS3'
phangs_extract_seds,source_name='ngc0628',resolution_filter='PACS3'
;=== smooth MUSE isrfs to a given resolution
;phangs_smooth_muse_isrf,'ngc0628',resolution_filter='PACS3',/test
phangs_smooth_muse_isrf,'ngc0628',resolution_filter='PACS3',/save
;==== Make isrf classes
make_phangs_isrf_classes,bidon,source_name='ngc0628',/fits,resolution_filter='PACS3'
phangs_smooth_muse_isrf,'ngc0628',reso_filter='SPIRE1',/save
;=== NGC3351
;Note: faire un chmod a+rwx * apres transfert sur alma1
source_name='ngc3351'
;J'en SUIS LA
;produces _jwst_images.sav and _ref_header.sav
phangs_make_jwst_images,source_name='ngc3351',/save,/show,/nostop
;produces _muse_filters_data.sav,_muse_images.sav, _muse_NH.sav
phangs_make_muse_filters_images,source_name='ngc3351',/save,/show,/nostop
;produces _astrosat_data.sav
phangs_make_astrosat_images,source_name='ngc3351',/save,/show,/nostop
;produces _herschel_images.sav
phangs_make_herschel_images,source_name='ngc3351',/save,/show,/nostop
phangs_make_hi_images,source_name='ngc3351',/save,/show,/nostop
phangs_make_co_images,source_name='ngc3351',/save,/show,/nostop
phangs_extract_seds,source_name='ngc3351',/save
make_phangs_ssps_isrf_prediction,source_name='ngc3351',/save
make_phangs_isrf_classes,source_name='ngc3351',/fits
phangs_brute_force_fit_with_isrf_grid,source_name='ngc3351',/include_herschel,/normalize,/fit_G0
END