compare_ssps.pro
2.06 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
PRO compare_ssps
;This compares CB19 and Emiles SSPs
st_bc19=dustem_read_cb19_stellar_templates(age_values=age_values_bc19,metalicity_values=metalicity_values_bc19,template_wav=template_wav_bc19)
age_values_emiles=[0.03, 0.05, 0.08, 0.15, 0.25, 0.40, 0.60, 1.0, 1.75, 3.0, 5.0, 8.5, 13.5]
metalicity_values_emiles=[-1.48630, -0.961400, -0.351200, +0.0600000, +0.255900, +0.397100]
st_emiles=dustem_read_emiles_stellar_templates(age_values_emiles,metalicity_values_emiles,template_wav=template_wav_emiles)
print,age_values_emiles
print,age_values_bc19
print,metalicity_values_emiles
print,metalicity_values_bc19
Nage=n_elements(age_values_emiles)
Nmetalicity=n_elements(metalicity_values_emiles)
;=== plot differences
win=1L
window,win,xsize=1500,ysize=1000
yr=[-100.,100.]
xr=[0.1,10.]
!p.multi=[0,3,2]
facts=range_gen(Nage,[10.,1])
facts[*]=0.
FOR j=0L,Nmetalicity-1 DO BEGIN
FOR i=0L,Nage-1 DO BEGIN
tit='Z='+strtrim(metalicity_values_emiles[j],2)
ij=lonarr(1,2)
ij[0,0]=i
ij[0,1]=j
index=ij2index(ij,[Nage,Nmetalicity])
fact=facts[i]
ssp=interpol(*st_bc19[index[0]],template_wav_bc19,template_wav_emiles)
diff=(*st_emiles[index[0]]-ssp)/*st_emiles[index[0]]*100. ;%
;stop
IF i EQ 0 THEN BEGIN
cgplot,template_wav_emiles,diff+fact,tit=tit,yr=yr,xr=xr,/xlog
ENDIF ELSE BEGIN
cgoplot,template_wav_emiles,diff+fact
ENDELSE
;stop
ENDFOR
;stop
ENDFOR
win=0L
window,win,xsize=1500,ysize=1000
yr=[1.e-8,1.e5]
xr=[0.1,10.]
!p.multi=[0,3,2]
facts=range_gen(Nage,[1000000.,1])
FOR j=0L,Nmetalicity-1 DO BEGIN
FOR i=0L,Nage-1 DO BEGIN
tit='Z='+strtrim(metalicity_values_emiles[j],2)
ij=lonarr(1,2)
ij[0,0]=i
ij[0,1]=j
index=ij2index(ij,[Nage,Nmetalicity])
fact=facts[i]
IF i EQ 0 THEN BEGIN
cgplot,template_wav_bc19,*st_bc19[index[0]]*fact,/xlog,/ylog,tit=tit,yr=yr,xr=xr
cgoplot,template_wav_emiles,*st_emiles[index[0]]*fact,color='red'
ENDIF ELSE BEGIN
cgoplot,template_wav_bc19,*st_bc19[index[0]]*fact
cgoplot,template_wav_emiles,*st_emiles[index[0]]*fact,color='red'
ENDELSE
;stop
ENDFOR
;stop
ENDFOR
stop
END