Blame view

LabTools/IRAP/JPB/phangs_compare_seds_isrf.pro 1.23 KB
42b6dd57   Jean-Philippe Bernard   first commit
1
2
3
4
5
6
7
8
9

PRO phangs_compare_seds_isrf

dir=!phangs_data_dir+'/ISRF/GRIDS/'
isrf_class_str='_isrfclass15'
model='DBP90'
table_name=dir+model+'_MuseISRF_JWST_G0_YPAH_YVSG_4Phangs'+isrf_class_str+'.fits'
st=mrdfits(table_name,1,h)

51c39c71   Jean-Philippe Bernard   first commit
10
11
use_filters_names=['F360M','F0770W','F1000W','F1130W','F2100W']
filters=dustem_filter_names2filters(use_filters_names)
758aaa55   Jean-Philippe Bernard   first commit
12
Nfilters=n_elements(filters)
42b6dd57   Jean-Philippe Bernard   first commit
13
14

ii=100L
c750f66d   Jean-Philippe Bernard   first commit
15
16

Nseds=1
c1496063   Jean-Philippe Bernard   first commit
17
sed=dustem_initialize_sed(Nfilters)
77c918be   Jean-Philippe Bernard   first commit
18
;sed=fltarr(Nfilters)
74fd018b   Jean-Philippe Bernard   first commit
19
tags=tag_names(st)
42b6dd57   Jean-Philippe Bernard   first commit
20
21
FOR i=0L,Nfilters-1 DO BEGIN
	ind=where(tags EQ 'I'+filters[i],count)
c750f66d   Jean-Philippe Bernard   first commit
22
23
	sed[i].filter=filters[i]
	sed[i].stokesI=st[ii].(ind[0])
42b6dd57   Jean-Philippe Bernard   first commit
24
ENDFOR
c750f66d   Jean-Philippe Bernard   first commit
25
26
sed.sigmaii=sed.stokesI*1.e-5

42b6dd57   Jean-Philippe Bernard   first commit
27
28
29
30
31
32
Nparams=3
true_params=fltarr(Nparams)
FOR i=0L,Nparams-1 DO BEGIN
  true_params[i]=st[ii].(i)
ENDFOR

c750f66d   Jean-Philippe Bernard   first commit
33
stop
42b6dd57   Jean-Philippe Bernard   first commit
34
35
36
37
38
39
40
41
42
43
44
45
46
47

isrf_class_str='_isrfclass0'
table_name_2=dir+model+'_MuseISRF_JWST_G0_YPAH_YVSG_4Phangs'+isrf_class_str+'.fits'

params=dustem_brute_force_fit(sed,table_name_2,filters,fact=fact,chi2=chi2,/normalize,rchi2=rchi2,show_sed=show_sed $
		   					 ,params_hit=params_hit,params_uncertainties=params_uncertainties,params_min=params_min,params_max=params_max $
		   					 ,fixed_parameters_description=fixed_parameters_description,fixed_parameters_values=fixed_parameters_values)

print,true_params
print,params

stop

END