test_dustem_dl07_isrf_model.pro 1.05 KB
PRO test_dustem_dl07_isrf_model

use_model='DL07'
dustem_init,model=use_model,polarization=use_polarization

;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
sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl_spectrum)

yr=[1.e-27,1.e-23]
;yr=[1.e-13,1.e-09]
xr=[3,1.e3]
nu=3.e14/dustem_get_wavelengths()
cgplot,dustem_get_wavelengths(),dl_spectrum,/xlog,/ylog,yr=yr,/ysty,xr=xr,/xsty

;gamma,alpha,Umin,Umax
key=[1,2,3,4]
;val=[0.2,2.,1.,1.e6]
;val=[0.2,2.,1.,100.]
;val=[0.2,0.,1.,100.]
;val=[0.1,2.,1.,1.e6]

;=== to check values in DL07 paper
;val=[0.02,2.,10.,1.e6]
val=[0.02,2.,1.,1.e6]

gamma=val[0]
alpha=val[1]
Umin=val[2]
Umax=val[3]

Umean=(1.-gamma)*Umin+gamma*Umin*alog(Umax/Umin)/(1.-Umin/Umax)

sed=dustem_plugin_dl07_isrf_model(key=key,val=val,spec=dl2_spectrum)

cgoplot,dustem_get_wavelengths(),dl2_spectrum/Umean,color='red'

stop

END