Blame view

src/idl/test_dustem_dl07_isrf_model.pro 2.59 KB
d01720a8   Jean-Philippe Bernard   First commit
1
2
3
4
PRO test_dustem_dl07_isrf_model

use_model='DL07'
dustem_init,model=use_model,polarization=use_polarization
0297394d   Jean-Philippe Bernard   test
5
!quiet=1
d01720a8   Jean-Philippe Bernard   First commit
6
7
8
9
10
11
12
13
14
15

;set up some data (needed as will return an SED)
dir=!dustem_wrap_soft_dir+'/Data/EXAMPLE_OBSDATA/'
file=dir+'SED_DraineModel_U1.0.xcat'
spec=read_xcat(file,/silent)
dustem_set_data,m_fit=spec,m_show=spec

;key=[1]
;val=[0.2]
key=0 & val=0   ;default values only
2f9a477d   Jean-Philippe Bernard   improved and tested
16
sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0,Umean=Umean)
d01720a8   Jean-Philippe Bernard   First commit
17

2f9a477d   Jean-Philippe Bernard   improved and tested
18
yr=[1.e-26,5.e-24]
d01720a8   Jean-Philippe Bernard   First commit
19
;yr=[1.e-13,1.e-09]
2f9a477d   Jean-Philippe Bernard   improved and tested
20
xr=[2,1.e3]
d01720a8   Jean-Philippe Bernard   First commit
21
nu=3.e14/dustem_get_wavelengths()
2f9a477d   Jean-Philippe Bernard   improved and tested
22
23
24
25
26
27
28
29
30
31
32
33

window,0,xsize=800,ysize=600
!p.multi=[0,2,2]

xtit='Wav [mic]'
ytit='nuInu/<U> [whatever]'

;==== Umin=1

val=[0.0,2.,1.,1.e6]
sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0,Umean=Umean0)
cgplot,dustem_get_wavelengths(),dl_spectrum_0/Umean,/xlog,/ylog,yr=yr,/ysty,xr=xr,/xsty,title='Umin=1',xtit=xtit,ytit=ytit
d01720a8   Jean-Philippe Bernard   First commit
34
35
36

;gamma,alpha,Umin,Umax
key=[1,2,3,4]
d01720a8   Jean-Philippe Bernard   First commit
37
val=[0.02,2.,1.,1.e6]
2f9a477d   Jean-Philippe Bernard   improved and tested
38
39
40
41
42
43
44
45
46
47
sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0p02,Umean=Umean)
cgoplot,dustem_get_wavelengths(),dl_spectrum_0p02/Umean,color='blue',linestyle=4

val=[0.01,2.,1.,1.e6]
sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0p01,Umean=Umean)
cgoplot,dustem_get_wavelengths(),dl_spectrum_0p01/Umean,color='green',linestyle=4

val=[0.005,2.,1.,1.e6]
sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0p005,Umean=Umean)
cgoplot,dustem_get_wavelengths(),dl_spectrum_0p005/Umean,color='red',linestyle=4
d01720a8   Jean-Philippe Bernard   First commit
48

2f9a477d   Jean-Philippe Bernard   improved and tested
49
cgoplot,dustem_get_wavelengths(),dl_spectrum_0/Umean0,color='black'
d01720a8   Jean-Philippe Bernard   First commit
50

2f9a477d   Jean-Philippe Bernard   improved and tested
51
;stop
d01720a8   Jean-Philippe Bernard   First commit
52

2f9a477d   Jean-Philippe Bernard   improved and tested
53
54
55
56
;==== Umin=10
val=[0.0,2.,10.,1.e6]
sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0,Umean=Umean0)
cgplot,dustem_get_wavelengths(),dl_spectrum_0/Umean0,/xlog,/ylog,yr=yr,/ysty,xr=xr,/xsty,title='Umin=10',xtit=xtit
d01720a8   Jean-Philippe Bernard   First commit
57

2f9a477d   Jean-Philippe Bernard   improved and tested
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75

val=[0.04,2.,10.,1.e6]
sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0p04,Umean=Umean)
cgoplot,dustem_get_wavelengths(),dl_spectrum_0p04/Umean,color='violet',linestyle=4

val=[0.02,2.,10.,1.e6]
sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0p02,Umean=Umean)
cgoplot,dustem_get_wavelengths(),dl_spectrum_0p02/Umean,color='blue',linestyle=4

val=[0.01,2.,10.,1.e6]
sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0p01,Umean=Umean)
cgoplot,dustem_get_wavelengths(),dl_spectrum_0p01/Umean,color='green',linestyle=4

val=[0.005,2.,10.,1.e6]
sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum_0p005,Umean=Umean)
cgoplot,dustem_get_wavelengths(),dl_spectrum_0p005/Umean,color='red',linestyle=4

cgoplot,dustem_get_wavelengths(),dl_spectrum_0/Umean0,color='black'
d01720a8   Jean-Philippe Bernard   First commit
76
77
78

stop

2f9a477d   Jean-Philippe Bernard   improved and tested
79

d01720a8   Jean-Philippe Bernard   First commit
80
END