Commit 8bab7d4bc978f8e107f462367b9fb8ed4d3328a0
1 parent
3c479f24
Exists in
master
small corrections + cleaning. Runs with pol (multiple datasets)
Showing
6 changed files
with
9 additions
and
53 deletions
Show diff stats
src/idl/dustem_activate_plugins.pro
@@ -41,7 +41,6 @@ ENDIF | @@ -41,7 +41,6 @@ ENDIF | ||
41 | p_dim = p_min * (*(*!dustem_fit).param_init_values) | 41 | p_dim = p_min * (*(*!dustem_fit).param_init_values) |
42 | st=dustem_run(p_dim) | 42 | st=dustem_run(p_dim) |
43 | 43 | ||
44 | - | ||
45 | if isa((*!dustem_fit).fixed_param_descs) then begin | 44 | if isa((*!dustem_fit).fixed_param_descs) then begin |
46 | 45 | ||
47 | ;concatenating the parameter vectors | 46 | ;concatenating the parameter vectors |
src/idl/dustem_fit_sed_orion.pro
@@ -9,7 +9,7 @@ use_mode='G17_MODELC';'DBP90';'G17_MODELA';'THEMIS';;'USER_MODEL';'THEMIS';;'THE | @@ -9,7 +9,7 @@ use_mode='G17_MODELC';'DBP90';'G17_MODELA';'THEMIS';;'USER_MODEL';'THEMIS';;'THE | ||
9 | dustem_init,mode=use_mode,kwords=['logn-chrg-spin','plaw-pol','plaw-pol'],/pol;,kwords=['plaw-ed','logn','logn'];,/pol;kwords=['plaw-ed-chrg-spin'],/pol;,kwords=['plaw-ed'];kwords=['plaw-ed-chrg-spin'];,/pol; | 9 | dustem_init,mode=use_mode,kwords=['logn-chrg-spin','plaw-pol','plaw-pol'],/pol;,kwords=['plaw-ed','logn','logn'];,/pol;kwords=['plaw-ed-chrg-spin'],/pol;,kwords=['plaw-ed'];kwords=['plaw-ed-chrg-spin'];,/pol; |
10 | ; | 10 | ; |
11 | ;stop | 11 | ;stop |
12 | -!dustem_verbose=0 | 12 | +!dustem_verbose=1 |
13 | !dustem_show_plot=1 | 13 | !dustem_show_plot=1 |
14 | !dustem_nocatch=1 | 14 | !dustem_nocatch=1 |
15 | 15 | ||
@@ -228,7 +228,9 @@ llims[6]=1.00E+04 | @@ -228,7 +228,9 @@ llims[6]=1.00E+04 | ||
228 | llims[7]=1.00E-04 | 228 | llims[7]=1.00E-04 |
229 | 229 | ||
230 | dustem_init_parinfo,pd,iv,up_limited=ulimed,lo_limited=llimed,up_limits=ulims,lo_limits=llims;,tied=tied | 230 | dustem_init_parinfo,pd,iv,up_limited=ulimed,lo_limited=llimed,up_limits=ulims,lo_limits=llims;,tied=tied |
231 | +;stop | ||
231 | dustem_init_plugins,pd | 232 | dustem_init_plugins,pd |
233 | +stop | ||
232 | 234 | ||
233 | ; fpd = [ $ | 235 | ; fpd = [ $ |
234 | ; '(*!dustem_params).grains(1).mdust_o_mh'$ | 236 | ; '(*!dustem_params).grains(1).mdust_o_mh'$ |
src/idl/dustem_init.pro
@@ -79,17 +79,6 @@ PRO dustem_init,model=model $ | @@ -79,17 +79,6 @@ PRO dustem_init,model=model $ | ||
79 | ;- | 79 | ;- |
80 | 80 | ||
81 | 81 | ||
82 | - | ||
83 | - | ||
84 | -;; ***COMMENT IC*** | ||
85 | -;I think this procedure should be throughly revised. (and also the rest of the code corrected) | ||
86 | -;Pointers are used when the need does not present itself. | ||
87 | -;ie: defsysv, '!dustem_fit', ptr_new(dustem_fit_st), defsysv,'!dustem_inputs',ptr_new() or defsysv,'!dustem_params',ptr_new() which don't require initialization for instance | ||
88 | -;; ***END COMMENT IC*** | ||
89 | - | ||
90 | - | ||
91 | - | ||
92 | - | ||
93 | IF keyword_set(help) THEN BEGIN | 82 | IF keyword_set(help) THEN BEGIN |
94 | doc_library,'dustem_init' | 83 | doc_library,'dustem_init' |
95 | goto,the_end | 84 | goto,the_end |
@@ -124,12 +113,6 @@ dustem_init_plugins,pd_bidon | @@ -124,12 +113,6 @@ dustem_init_plugins,pd_bidon | ||
124 | defsysv,'!dustem_nocatch',0 ;set to catch errors in SED fitting. | 113 | defsysv,'!dustem_nocatch',0 ;set to catch errors in SED fitting. |
125 | 114 | ||
126 | 115 | ||
127 | -;; ***COMMENT AH*** | ||
128 | -;; do we still need this ? --> | ||
129 | -;==== define a stellar modifier to the ISRF | ||
130 | -;toto=dustem_define_isrf_stellar_modifyer_variable() | ||
131 | -;; ***END COMMENT AH*** | ||
132 | - | ||
133 | ;=== read info about instrument | 116 | ;=== read info about instrument |
134 | file=!dustem_wrap_soft_dir+'instrument_description.xcat' | 117 | file=!dustem_wrap_soft_dir+'instrument_description.xcat' |
135 | st=read_xcat(file,/silent) | 118 | st=read_xcat(file,/silent) |
@@ -218,22 +201,6 @@ defsysv, '!dustemcgwin_id', { $ ;IDs of windows to plot | @@ -218,22 +201,6 @@ defsysv, '!dustemcgwin_id', { $ ;IDs of windows to plot | ||
218 | prms: la_undef(), $ | 201 | prms: la_undef(), $ |
219 | plgns: la_undef() $ | 202 | plgns: la_undef() $ |
220 | } | 203 | } |
221 | -;I am doing this to save time instead of filtering the _extra structure | ||
222 | -; ;This part is not used so I will comment it | ||
223 | -; defsysv, '!dustemcgwin_extra', { $ ;Data to fit | ||
224 | -; sed: ptr_new(), $ ; | ||
225 | -; ext: ptr_new(), $ ; | ||
226 | -; qsed: ptr_new(), $ ; | ||
227 | -; used: ptr_new(), $ ; | ||
228 | -; polsed: ptr_new(), $ ; | ||
229 | -; polfrac: ptr_new(), $ ; | ||
230 | -; psi_em: ptr_new(), $ ; | ||
231 | -; qext: ptr_new(), $ ; | ||
232 | -; uext: ptr_new(), $ ; | ||
233 | -; polext: ptr_new(), $ ; | ||
234 | -; psi_ext: ptr_new() $ ; | ||
235 | -; | ||
236 | -; } | ||
237 | 204 | ||
238 | defsysv, '!dustemcgwin_ncmds', { $ ;Data to fit | 205 | defsysv, '!dustemcgwin_ncmds', { $ ;Data to fit |
239 | sed: {pl:0, nrm:0}, $ ; | 206 | sed: {pl:0, nrm:0}, $ ; |
@@ -378,12 +345,12 @@ defsysv, '!dustem_model', model | @@ -378,12 +345,12 @@ defsysv, '!dustem_model', model | ||
378 | (*!dustem_inputs).grain='GRAIN_THEMIS.DAT' | 345 | (*!dustem_inputs).grain='GRAIN_THEMIS.DAT' |
379 | (*!dustem_inputs).align='ALIGN_THEMIS.DAT' | 346 | (*!dustem_inputs).align='ALIGN_THEMIS.DAT' |
380 | END | 347 | END |
381 | - 'NY_MODELA':BEGIN | 348 | + 'NY_MODELA':BEGIN ;TB removed? |
382 | (*!dustem_inputs).grain='GRAIN_NY_MODELA.DAT' | 349 | (*!dustem_inputs).grain='GRAIN_NY_MODELA.DAT' |
383 | (*!dustem_inputs).align='ALIGN_G17_MODELA.DAT' | 350 | (*!dustem_inputs).align='ALIGN_G17_MODELA.DAT' |
384 | END | 351 | END |
385 | ;This is a user-defined model ;This will probably need to be modified. | 352 | ;This is a user-defined model ;This will probably need to be modified. |
386 | - 'USER_MODEL':BEGIN | 353 | + 'USER_MODEL':BEGIN ;TB removed? |
387 | (*!dustem_inputs).grain='GRAIN_USER.DAT' | 354 | (*!dustem_inputs).grain='GRAIN_USER.DAT' |
388 | END | 355 | END |
389 | ELSE:BEGIN | 356 | ELSE:BEGIN |
@@ -416,7 +383,6 @@ if keyword_set(kwords) then defsysv, '!dustem_kwords', ptr_new(kwords) else defs | @@ -416,7 +383,6 @@ if keyword_set(kwords) then defsysv, '!dustem_kwords', ptr_new(kwords) else defs | ||
416 | st_model=dustem_read_all(dir_in,/silent) | 383 | st_model=dustem_read_all(dir_in,/silent) |
417 | !dustem_params=ptr_new(st_model) | 384 | !dustem_params=ptr_new(st_model) |
418 | 385 | ||
419 | - | ||
420 | ;=== create dynamical storage if needed | 386 | ;=== create dynamical storage if needed |
421 | IF not file_test(!dustem_dat,/dir) THEN BEGIN | 387 | IF not file_test(!dustem_dat,/dir) THEN BEGIN |
422 | spawn,'mkdir '+!dustem_dat | 388 | spawn,'mkdir '+!dustem_dat |
@@ -483,7 +449,6 @@ endif ; /noerase | @@ -483,7 +449,6 @@ endif ; /noerase | ||
483 | IF keyword_set(wraptest) THEN BEGIN | 449 | IF keyword_set(wraptest) THEN BEGIN |
484 | dir_out=!dustem_dat | 450 | dir_out=!dustem_dat |
485 | dustem_write_all,st_model,dir_out | 451 | dustem_write_all,st_model,dir_out |
486 | - ; stop | ||
487 | st=dustem_run() | 452 | st=dustem_run() |
488 | IF keyword_set(plot_it) THEN BEGIN | 453 | IF keyword_set(plot_it) THEN BEGIN |
489 | loadct,13 | 454 | loadct,13 |
@@ -491,8 +456,6 @@ IF keyword_set(wraptest) THEN BEGIN | @@ -491,8 +456,6 @@ IF keyword_set(wraptest) THEN BEGIN | ||
491 | ENDIF | 456 | ENDIF |
492 | ENDIF | 457 | ENDIF |
493 | 458 | ||
494 | -;stop | ||
495 | - | ||
496 | ;Initialize filters | 459 | ;Initialize filters |
497 | dustem_filter_init | 460 | dustem_filter_init |
498 | 461 |
src/idl/dustem_read_isrf.pro
@@ -28,7 +28,7 @@ IF !dustem_which EQ 'VERSTRAETE' THEN BEGIN | @@ -28,7 +28,7 @@ IF !dustem_which EQ 'VERSTRAETE' THEN BEGIN | ||
28 | Nisrf=n_elements(st) | 28 | Nisrf=n_elements(st) |
29 | ENDIF | 29 | ENDIF |
30 | ;IF getenv('DUSTEM_WHICH') EQ 'WEB3p8' THEN BEGIN | 30 | ;IF getenv('DUSTEM_WHICH') EQ 'WEB3p8' THEN BEGIN |
31 | -IF !dustem_which EQ 'WEB3p8' THEN BEGIN | 31 | +IF !dustem_which EQ 'RELEASE' THEN BEGIN |
32 | st=st(1:*) | 32 | st=st(1:*) |
33 | Nisrf=n_elements(st) | 33 | Nisrf=n_elements(st) |
34 | ENDIF | 34 | ENDIF |
src/idl/dustem_run.pro
@@ -45,7 +45,6 @@ CASE n_params() OF | @@ -45,7 +45,6 @@ CASE n_params() OF | ||
45 | 0: BEGIN | 45 | 0: BEGIN |
46 | END | 46 | END |
47 | 1: BEGIN | 47 | 1: BEGIN |
48 | - ;stop | ||
49 | dustem_set_params,params | 48 | dustem_set_params,params |
50 | END | 49 | END |
51 | ELSE: BEGIN | 50 | ELSE: BEGIN |
@@ -55,15 +54,9 @@ CASE n_params() OF | @@ -55,15 +54,9 @@ CASE n_params() OF | ||
55 | END | 54 | END |
56 | ENDCASE | 55 | ENDCASE |
57 | 56 | ||
58 | -;spawn,'dustem' | ||
59 | -;st=dustem_read_all_res(getenv('DUSTEM_RES'),/silent) | ||
60 | -;print,'params',params | ||
61 | -;stop | ||
62 | - | ||
63 | spawn,!dustem_f90_exec | 57 | spawn,!dustem_f90_exec |
64 | - | ||
65 | st=dustem_read_all_res(!dustem_res,/silent) | 58 | st=dustem_read_all_res(!dustem_res,/silent) |
66 | - | 59 | + |
67 | the_end: | 60 | the_end: |
68 | 61 | ||
69 | RETURN,st | 62 | RETURN,st |
src/idl/dustem_write_isrf_lv.pro
@@ -38,15 +38,14 @@ ENDIF | @@ -38,15 +38,14 @@ ENDIF | ||
38 | 38 | ||
39 | 39 | ||
40 | IF tag_exist(*!dustem_plugin,'STELLAR_POPULATION') THEN BEGIN | 40 | IF tag_exist(*!dustem_plugin,'STELLAR_POPULATION') THEN BEGIN |
41 | - IF isa((*!dustem_plugin).stellar_population) THEN goto, the_end | 41 | + IF isa((*!dustem_plugin).stellar_population.spec) THEN goto, the_end |
42 | ENDIF | 42 | ENDIF |
43 | 43 | ||
44 | -;NOW YOU HAVE TO LOOP ON THE COMMENTS TO SEE IF IT IS THE COMPOSITE ISRF FILE OR THE MATHIS ONE. | ||
45 | 44 | ||
45 | +;MODIFY THIS TO DISPLAY THE ACTUAL VALUES BECAUSE IT IS JUST DISPLAYING EMPTY STRINGS AT THE MOMENT | ||
46 | Ncomments=6 | 46 | Ncomments=6 |
47 | c=strarr(Ncomments) | 47 | c=strarr(Ncomments) |
48 | 48 | ||
49 | -;MODIFY THIS TO DISPLAY THE ACTUAL VALUES BECAUSE IT IS JUST DISPLAYING EMPTY STRINGS AT THE MOMENT | ||
50 | 49 | ||
51 | ;First lines of the ISRF.DAT file | 50 | ;First lines of the ISRF.DAT file |
52 | c(0)='# DUSTEM: exciting radiation field featuring' | 51 | c(0)='# DUSTEM: exciting radiation field featuring' |