Commit cf92aab30bc49c80ce3b5315b2b7194204be64d6

Authored by Jean-Philippe Bernard
1 parent 42e5460f
Exists in master

improved

src/idl/dustem_fit_sed_polsed_readme.pro
... ... @@ -42,12 +42,13 @@ PRO dustem_fit_sed_polsed_readme,postcript=postcript,mode=mode,help=help
42 42 ; Contact J.-Ph. Bernard (Jean-Philippe.Bernard@cesr.fr) in case of problems.
43 43 ;-
44 44  
45   -
46 45 IF keyword_set(help) THEN BEGIN
47 46 doc_library,'dustem_fit_sed_polsed_readme'
48 47 goto,the_end
49 48 ENDIF
50 49  
  50 +dustem_define_la_common
  51 +
51 52 ;=== initialise dustem
52 53 ;dustem_init,mode='COMPIEGNE_ETAL2010',/pol
53 54 use_mode='G17_MODELA'
... ...
src/idl/dustem_fit_sed_readme.pro
... ... @@ -152,30 +152,29 @@ CASE use_model OF
152 152 ;ORIGINAL LINES
153 153  
154 154 ;parameter description of parameters to be fitted
155   -; pd = [ $
156   -; '(*!dustem_params).gas.G0', $ ;G0
157   -; 'dustem_create_continuum_2', $ ;intensity of NIR continuum
158   -;
159   -; ;'!dustem_isrf_star_add[0].distance', $ ;distance of first stellar contribution to ISRF
160   -; '!dustem_isrf_star_add[0].amplitude', $ ;amplitude of first stellar contribution to ISRF
161   -; '(*!dustem_params).grains(0).mdust_o_mh',$ ;PAH0 mass fraction
162   -; '(*!dustem_params).grains(1).mdust_o_mh',$ ;PAH1 mass fraction
163   -; '(*!dustem_params).grains(2).mdust_o_mh', $ ;amCBEx
164   -; '(*!dustem_params).grains(3).mdust_o_mh', $ ;amCBEx
165   -; '(*!dustem_params).grains(4).mdust_o_mh' $
166   -; ]
167   -; ;initial parameter values for parameters to be fitted
168   -; iv = [ $
169   -; 1.0, $
170   -; 0.002, $ ;intensity of NIR continuum
171   -; ;0.003, $ ;distance of first stellar contribution to ISRF
172   -; 1.e-3, $ ;amplitude of first stellar contribution to ISRF
173   -; 7.8e-4, $ ;mass fraction of PAH0
174   -; 7.8e-4, $ ;mass fraction of PAH1
175   -; 1.65e-4, $ ;mass fraction of amCBEx
176   -; 1.45e-3, $ ;mass fraction of amCBEx
177   -; 7.8e-3 $ ;mass fraction of
178   -; ]
  155 + pd = [ $
  156 + '(*!dustem_params).gas.G0', $ ;G0
  157 + 'dustem_create_continuum_2', $ ;intensity of NIR continuum
  158 + ;'!dustem_isrf_star_add[0].distance', $ ;distance of first stellar contribution to ISRF
  159 + ;'!dustem_isrf_star_add[0].amplitude', $ ;amplitude of first stellar contribution to ISRF
  160 + '(*!dustem_params).grains(0).mdust_o_mh',$ ;PAH0 mass fraction
  161 + '(*!dustem_params).grains(1).mdust_o_mh',$ ;PAH1 mass fraction
  162 + '(*!dustem_params).grains(2).mdust_o_mh', $ ;amCBEx
  163 + '(*!dustem_params).grains(3).mdust_o_mh', $ ;amCBEx
  164 + '(*!dustem_params).grains(4).mdust_o_mh' $
  165 + ]
  166 + ;initial parameter values for parameters to be fitted
  167 + iv = [ $
  168 + 1.0, $
  169 + 0.002, $ ;intensity of NIR continuum
  170 + ;0.003, $ ;distance of first stellar contribution to ISRF
  171 + ;1.e-3, $ ;amplitude of first stellar contribution to ISRF
  172 + 7.8e-4, $ ;mass fraction of PAH0
  173 + 7.8e-4, $ ;mass fraction of PAH1
  174 + 1.65e-4, $ ;mass fraction of amCBEx
  175 + 1.45e-3, $ ;mass fraction of amCBEx
  176 + 7.8e-3 $ ;mass fraction of
  177 + ]
179 178  
180 179 ;NEW LINES
181 180  
... ... @@ -199,59 +198,59 @@ CASE use_model OF
199 198 ; '(*!dustem_params).grains(4).mdust_o_mh' $
200 199 ; ]
201 200  
202   - pd = [ $
203   - ;'(*!dustem_params).G0', $ ;G0
204   - '(*!dustem_params).grains(0).mdust_o_mh',$ ;PAH0 mass fraction
205   - '(*!dustem_params).grains(1).mdust_o_mh',$ ;PAH1 mass fraction
206   - '(*!dustem_params).grains(2).mdust_o_mh', $ ;amCBEx
207   - '(*!dustem_params).grains(3).mdust_o_mh', $ ;amCBEx
208   - '(*!dustem_params).grains(4).mdust_o_mh', $
209   - ;'dustem_create_continuum_2', $ ;intensity of NIR continuum
210   - 'dustem_create_stellar_population_O63',$ ; distance to the O6 stellar population
  201 + ; pd = [ $
  202 + ; ;'(*!dustem_params).G0', $ ;G0
  203 + ; '(*!dustem_params).grains(0).mdust_o_mh',$ ;PAH0 mass fraction
  204 + ; '(*!dustem_params).grains(1).mdust_o_mh',$ ;PAH1 mass fraction
  205 + ; '(*!dustem_params).grains(2).mdust_o_mh', $ ;amCBEx
  206 + ; '(*!dustem_params).grains(3).mdust_o_mh', $ ;amCBEx
  207 + ; '(*!dustem_params).grains(4).mdust_o_mh', $
  208 + ; ;'dustem_create_continuum_2', $ ;intensity of NIR continuum
  209 + ; 'dustem_create_stellar_population_O63',$ ; distance to the O6 stellar population
211 210  
212   - ;'dustem_create_stellar_population_O64',$ ; amplitude of the O6 stellar population
  211 + ; ;'dustem_create_stellar_population_O64',$ ; amplitude of the O6 stellar population
213 212  
214   - ;'dustem_create_stellar_population_O65',$ ; number of stars of the O6 stellar population
215   - 'dustem_create_stellar_population_B43'$ ; distance to the B4 stellar population
  213 + ; ;'dustem_create_stellar_population_O65',$ ; number of stars of the O6 stellar population
  214 + ; 'dustem_create_stellar_population_B43'$ ; distance to the B4 stellar population
216 215  
217   - ;;'dustem_create_stellar_population_B44',$ ; amplitude of the B4 stellar population
  216 + ; ;;'dustem_create_stellar_population_B44',$ ; amplitude of the B4 stellar population
218 217  
219   - ;'dustem_create_stellar_population_B45'$ ; number of stars of the B4 stellar population
220   - ]
  218 + ; ;'dustem_create_stellar_population_B45'$ ; number of stars of the B4 stellar population
  219 + ; ]
221 220  
222 221  
223 222 ;initial parameter values for parameters to be fitted
224   -; iv = [ $
225   -; 1., $ ;G0
226   -; 7.8e-4, $ ;mass fraction of PAH0
227   -; 7.8e-4, $ ;mass fraction of PAH1
228   -; 1.65e-4, $ ;mass fraction of amCBEx
229   -; 1.45e-3, $ ;mass fraction of amCBEx
230   -; 7.8e-3, $ ;mass fraction of big grains?
231   -; 0.002, $ ;intensity of NIR continuum
232   -; 10.,$
233   -; ;;1.,$
234   -; 1.,$
235   -; 10.,$
236   -; ;;1.,$
237   -; 1.$
238   -; ]
  223 + ; iv = [ $
  224 + ; 1., $ ;G0
  225 + ; 7.8e-4, $ ;mass fraction of PAH0
  226 + ; 7.8e-4, $ ;mass fraction of PAH1
  227 + ; 1.65e-4, $ ;mass fraction of amCBEx
  228 + ; 1.45e-3, $ ;mass fraction of amCBEx
  229 + ; 7.8e-3, $ ;mass fraction of big grains?
  230 + ; 0.002, $ ;intensity of NIR continuum
  231 + ; 10.,$
  232 + ; ;;1.,$
  233 + ; 1.,$
  234 + ; 10.,$
  235 + ; ;;1.,$
  236 + ; 1.$
  237 + ; ]
239 238 ;
240 239  
241   - iv = [ $
242   - 7.8e-4, $ ;mass fraction of PAH0
243   - 7.8e-4, $ ;mass fraction of PAH1
244   - 1.65e-4, $ ;mass fraction of amCBEx
245   - 1.45e-3, $ ;mass fraction of amCBEx
246   - 7.8e-3, $ ;mass fraction of big grains?
247   - ;0.002, $ ;intensity of NIR continuum
248   - 10.,$
249   - ;;1.,$
250   - ;1.,$
251   - 10.$
252   - ;;1.,$
253   - ;1.$
254   - ]
  240 + ; iv = [ $
  241 + ; 7.8e-4, $ ;mass fraction of PAH0
  242 + ; 7.8e-4, $ ;mass fraction of PAH1
  243 + ; 1.65e-4, $ ;mass fraction of amCBEx
  244 + ; 1.45e-3, $ ;mass fraction of amCBEx
  245 + ; 7.8e-3, $ ;mass fraction of big grains?
  246 + ; ;0.002, $ ;intensity of NIR continuum
  247 + ; 10.,$
  248 + ; ;;1.,$
  249 + ; ;1.,$
  250 + ; 10.$
  251 + ; ;;1.,$
  252 + ; ;1.$
  253 + ; ]
255 254  
256 255  
257 256  
... ... @@ -273,11 +272,11 @@ CASE use_model OF
273 272 ;llims =[1e-5 ,0. ,0. ,0. ,0. ,0. ,0. ,1. ,0. , 1. ,0. ]
274 273  
275 274 ;llims =[0. ,0. ,0. ,0. ,0. ,0. ,1. ,0. , 1. ,0. ]
276   - llims =[0. ,0. ,0. ,0. ,0. ,1. , 1. ]
  275 + ;llims =[0. ,0. ,0. ,0. ,0. ,1. , 1. ]
277 276  
278 277 ulimed=replicate(0,Npar)
279 278 llimed=replicate(1,Npar)
280   - ;llims=replicate(0.,Npar)
  279 + llims=replicate(0.,Npar)
281 280  
282 281  
283 282 ;=== Fixed parameters
... ... @@ -383,7 +382,8 @@ dustem_init_plugins, pd ;initializing the scopes of the plugins to be read later
383 382  
384 383 ;=== RUN fit
385 384 tol=1.e-16
386   -use_Nitermax=50 ;maximum number of iteration. This is the criterium which will stop the fit procedure , NOTA BENE: 3 iterations aren't enough to fit the entirety of the newly added stellar population parameters.
  385 +;use_Nitermax=50 ;maximum number of iteration. This is the criterium which will stop the fit procedure , NOTA BENE: 3 iterations aren't enough to fit the entirety of the newly added stellar population parameters.
  386 +use_Nitermax=5 ;maximum number of iteration. This is the criterium which will stop the fit procedure , NOTA BENE: 3 iterations aren't enough to fit the entirety of the newly added stellar population parameters.
387 387 IF keyword_set(itermax) THEN use_Nitermax=itermax
388 388  
389 389 t1=systime(0,/sec)
... ...