Commit 2f9a477d82595febe19dfde4a0ee6eb7cdaea7a0
1 parent
79bbc7a3
Exists in
master
improved and tested
Showing
2 changed files
with
56 additions
and
21 deletions
Show diff stats
src/idl/dustem_plugin_dl07_isrf_model.pro
1 | -FUNCTION dustem_plugin_dl07_isrf_model, key=key, val=val, scope=scope, paramtag=paramtag,help=help,spec=spec | |
1 | +FUNCTION dustem_plugin_dl07_isrf_model, key=key, val=val, scope=scope, paramtag=paramtag,help=help,spec=spec,Umean=Umean | |
2 | 2 | |
3 | 3 | ;+ |
4 | 4 | ; NAME: |
... | ... | @@ -96,6 +96,8 @@ IF keyword_set(key) THEN BEGIN |
96 | 96 | ENDIF |
97 | 97 | ENDIF |
98 | 98 | |
99 | +Umean=(1.-gamma)*Umin+gamma*Umin*alog(Umax/Umin)/(1.-Umin/Umax) | |
100 | + | |
99 | 101 | ;default_model='DL07' |
100 | 102 | |
101 | 103 | ;;dustem_init should actually be done outsdide the plugin |
... | ... | @@ -118,8 +120,9 @@ spec=(1.-gamma)*spec1 |
118 | 120 | |
119 | 121 | ;==== add contribution of dust seeing a power law of U |
120 | 122 | spec2[*]=0. |
121 | -NUs=10L | |
122 | -;NUs=50L | |
123 | +;NUs=3L | |
124 | +;NUs=10L | |
125 | +NUs=50L | |
123 | 126 | Us=range_gen(NUs,[Umin,Umax],/log) |
124 | 127 | specs=fltarr(NUs,Nwavs) |
125 | 128 | ;stop | ... | ... |
src/idl/test_dustem_dl07_isrf_model.pro
... | ... | @@ -12,36 +12,68 @@ dustem_set_data,m_fit=spec,m_show=spec |
12 | 12 | ;key=[1] |
13 | 13 | ;val=[0.2] |
14 | 14 | key=0 & val=0 ;default values only |
15 | -sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum) | |
15 | +sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0,Umean=Umean) | |
16 | 16 | |
17 | -yr=[1.e-27,1.e-23] | |
17 | +yr=[1.e-26,5.e-24] | |
18 | 18 | ;yr=[1.e-13,1.e-09] |
19 | -xr=[3,1.e3] | |
19 | +xr=[2,1.e3] | |
20 | 20 | nu=3.e14/dustem_get_wavelengths() |
21 | -cgplot,dustem_get_wavelengths(),dl_spectrum,/xlog,/ylog,yr=yr,/ysty,xr=xr,/xsty | |
21 | + | |
22 | +window,0,xsize=800,ysize=600 | |
23 | +!p.multi=[0,2,2] | |
24 | + | |
25 | +xtit='Wav [mic]' | |
26 | +ytit='nuInu/<U> [whatever]' | |
27 | + | |
28 | +;==== Umin=1 | |
29 | + | |
30 | +val=[0.0,2.,1.,1.e6] | |
31 | +sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0,Umean=Umean0) | |
32 | +cgplot,dustem_get_wavelengths(),dl_spectrum_0/Umean,/xlog,/ylog,yr=yr,/ysty,xr=xr,/xsty,title='Umin=1',xtit=xtit,ytit=ytit | |
22 | 33 | |
23 | 34 | ;gamma,alpha,Umin,Umax |
24 | 35 | key=[1,2,3,4] |
25 | -;val=[0.2,2.,1.,1.e6] | |
26 | -;val=[0.2,2.,1.,100.] | |
27 | -;val=[0.2,0.,1.,100.] | |
28 | -;val=[0.1,2.,1.,1.e6] | |
29 | - | |
30 | -;=== to check values in DL07 paper | |
31 | -;val=[0.02,2.,10.,1.e6] | |
32 | 36 | val=[0.02,2.,1.,1.e6] |
37 | +sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0p02,Umean=Umean) | |
38 | +cgoplot,dustem_get_wavelengths(),dl_spectrum_0p02/Umean,color='blue',linestyle=4 | |
39 | + | |
40 | +val=[0.01,2.,1.,1.e6] | |
41 | +sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0p01,Umean=Umean) | |
42 | +cgoplot,dustem_get_wavelengths(),dl_spectrum_0p01/Umean,color='green',linestyle=4 | |
43 | + | |
44 | +val=[0.005,2.,1.,1.e6] | |
45 | +sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0p005,Umean=Umean) | |
46 | +cgoplot,dustem_get_wavelengths(),dl_spectrum_0p005/Umean,color='red',linestyle=4 | |
33 | 47 | |
34 | -gamma=val[0] | |
35 | -alpha=val[1] | |
36 | -Umin=val[2] | |
37 | -Umax=val[3] | |
48 | +cgoplot,dustem_get_wavelengths(),dl_spectrum_0/Umean0,color='black' | |
38 | 49 | |
39 | -Umean=(1.-gamma)*Umin+gamma*Umin*alog(Umax/Umin)/(1.-Umin/Umax) | |
50 | +;stop | |
40 | 51 | |
41 | -sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl2_spectrum) | |
52 | +;==== Umin=10 | |
53 | +val=[0.0,2.,10.,1.e6] | |
54 | +sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0,Umean=Umean0) | |
55 | +cgplot,dustem_get_wavelengths(),dl_spectrum_0/Umean0,/xlog,/ylog,yr=yr,/ysty,xr=xr,/xsty,title='Umin=10',xtit=xtit | |
42 | 56 | |
43 | -cgoplot,dustem_get_wavelengths(),dl2_spectrum/Umean,color='red' | |
57 | + | |
58 | +val=[0.04,2.,10.,1.e6] | |
59 | +sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0p04,Umean=Umean) | |
60 | +cgoplot,dustem_get_wavelengths(),dl_spectrum_0p04/Umean,color='violet',linestyle=4 | |
61 | + | |
62 | +val=[0.02,2.,10.,1.e6] | |
63 | +sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0p02,Umean=Umean) | |
64 | +cgoplot,dustem_get_wavelengths(),dl_spectrum_0p02/Umean,color='blue',linestyle=4 | |
65 | + | |
66 | +val=[0.01,2.,10.,1.e6] | |
67 | +sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0p01,Umean=Umean) | |
68 | +cgoplot,dustem_get_wavelengths(),dl_spectrum_0p01/Umean,color='green',linestyle=4 | |
69 | + | |
70 | +val=[0.005,2.,10.,1.e6] | |
71 | +sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0p005,Umean=Umean) | |
72 | +cgoplot,dustem_get_wavelengths(),dl_spectrum_0p005/Umean,color='red',linestyle=4 | |
73 | + | |
74 | +cgoplot,dustem_get_wavelengths(),dl_spectrum_0/Umean0,color='black' | |
44 | 75 | |
45 | 76 | stop |
46 | 77 | |
78 | + | |
47 | 79 | END |
48 | 80 | \ No newline at end of file | ... | ... |