Commit fc9462b19d8cb8f62815369efbab49561170dc8a

Authored by Annie Hughes
1 parent 23cfc6a3
Exists in master

simplified fitting

Showing 1 changed file with 8 additions and 9 deletions   Show diff stats
src/idl/dustem_extract_sed_example.pro
@@ -109,11 +109,11 @@ sed2=dustem_sed_extractor(maps,index_on,filters,maps_order=maps_order,/total_int @@ -109,11 +109,11 @@ sed2=dustem_sed_extractor(maps,index_on,filters,maps_order=maps_order,/total_int
109 cgoplot,sed2.wave,sed2.stokesI 109 cgoplot,sed2.wave,sed2.stokesI
110 cgoplot,sed2.wave,sed2.stokesI,psym='Filled Circle',color='blue' 110 cgoplot,sed2.wave,sed2.stokesI,psym='Filled Circle',color='blue'
111 111
112 -;; Try a simple BB fit of a dust model to SED 112 +;; Try a simple BB fit of a dust model to SED using the continuum plugin
113 113
114 ;=== INFORMATION TO RUN THE FITS 114 ;=== INFORMATION TO RUN THE FITS
115 tol=1.e-16 ;fit tolerence 115 tol=1.e-16 ;fit tolerence
116 -use_Nitermax=10 116 +use_Nitermax=20
117 117
118 ;=== INFORMATION TO MAKE THE PLOTS 118 ;=== INFORMATION TO MAKE THE PLOTS
119 yr=[1.00e1,8.00E8] ; y-axis limits 119 yr=[1.00e1,8.00E8] ; y-axis limits
@@ -123,27 +123,26 @@ ytit=textoidl('I_\nu (MJy/sr)') ; y-axis title @@ -123,27 +123,26 @@ ytit=textoidl('I_\nu (MJy/sr)') ; y-axis title
123 xtit=textoidl('\lambda (\mum)') ; x-axis title 123 xtit=textoidl('\lambda (\mum)') ; x-axis title
124 124
125 pd = [ $ 125 pd = [ $
126 - '(*!dustem_params).G0', $ ;G0  
127 'dustem_plugin_continuum_1', $ ;Temperature of a BB 126 'dustem_plugin_continuum_1', $ ;Temperature of a BB
128 'dustem_plugin_continuum_2'] ;Peak amplitude of a BB 127 'dustem_plugin_continuum_2'] ;Peak amplitude of a BB
129 128
130 -iv = [1., 10., 1.e6] ; initial guess 129 +iv = [15., 1.e6] ; initial guess
131 130
132 Npar=n_elements(pd) 131 Npar=n_elements(pd)
133 ulimed=replicate(0,Npar) 132 ulimed=replicate(0,Npar)
134 llimed=replicate(1,Npar) 133 llimed=replicate(1,Npar)
135 llims=replicate(1.e-15,Npar) 134 llims=replicate(1.e-15,Npar)
136 135
137 - 136 +;; DustEM requires a physical dust model. Here we have used DBP90, but
  137 +;; fix all grain components to ~zero.
138 fpd = [ $ 138 fpd = [ $
139 - '(*!dustem_params).grains(0).mdust_o_mh',$ ;PAH 139 + '(*!dustem_params).G0', $ ;G0
  140 + '(*!dustem_params).grains(0).mdust_o_mh',$ ;PAH
140 '(*!dustem_params).grains(1).mdust_o_mh',$ ;VSG 141 '(*!dustem_params).grains(1).mdust_o_mh',$ ;VSG
141 '(*!dustem_params).grains(2).mdust_o_mh'] ;BG 142 '(*!dustem_params).grains(2).mdust_o_mh'] ;BG
  143 +fiv = [1.0, 1.e-12,1.e-12,1.e-12]
142 144
143 -fiv = [1.e-12,1.e-12,1.e-12]  
144 145
145 -ind=where(sed.sigmaII LT (0.2*sed.StokesI)^2,count)  
146 -IF count NE 0 THEN sed[ind].sigmaII=(0.2*sed[ind].StokesI)^2  
147 dustem_set_data,m_fit=sed,m_show=sed 146 dustem_set_data,m_fit=sed,m_show=sed
148 dustem_init_params,use_model,pd,iv,fpd=fpd,fiv=fiv,ulimed=ulimed,llimed=llimed,ulims=ulims,llims=llims 147 dustem_init_params,use_model,pd,iv,fpd=fpd,fiv=fiv,ulimed=ulimed,llimed=llimed,ulims=ulims,llims=llims
149 148