Commit cc238f2b734b5579f276672e4e978fcfba1e834b
Exists in
master
Merge branch 'master' of https://gitlab.irap.omp.eu/OV-GSO-DC/dustem-wrapper_idl
Showing
4 changed files
with
26 additions
and
27 deletions
Show diff stats
src/idl/dustem_plugin_mbbdy.pro
... | ... | @@ -42,7 +42,7 @@ ENDIF |
42 | 42 | |
43 | 43 | ;default values of input parameters |
44 | 44 | amp = 0.5 ; Amplitude of the modified black-body emission |
45 | -temp = 19 ; Temperature of the dust species | |
45 | +temp = 20.0 ; Temperature of the dust | |
46 | 46 | beta = 1.8 ; Emissivity index |
47 | 47 | |
48 | 48 | w0=100. ; Theoretical wavelength (3THz) where optical depth equals unity |
... | ... | @@ -53,7 +53,7 @@ smallp=0. |
53 | 53 | psi=0. |
54 | 54 | |
55 | 55 | scope='ADD_SED+ADD_POLSED' |
56 | -paramtag=['Amp','T_MBB (K)','beta (Plaw_index)','p','Psi (deg)'] | |
56 | +paramtag=['Amp',textoidl('T_{MBB}')+' [K]',textoidl('\beta'),'p','Psi [deg]'] | |
57 | 57 | |
58 | 58 | IF keyword_set(key) THEN BEGIN |
59 | 59 | ... | ... |
src/idl/dustem_write_fits_table.pro
... | ... | @@ -55,19 +55,16 @@ IF keyword_set(help) THEN BEGIN |
55 | 55 | ENDIF |
56 | 56 | |
57 | 57 | ;===== run dustem to get predicted spectrum and sed |
58 | -IF ptr_valid((*!dustem_data).sed) THEN BEGIN | |
59 | - stop | |
58 | +IF ptr_valid((*!dustem_data).sed) THEN $ | |
60 | 59 | dustem_predicted_sed=dustem_compute_sed(*(*!dustem_fit).current_param_values,out_st=dustem_spectra_st) |
61 | -ENDIF ELSE BEGIN | |
62 | -ENDELSE | |
63 | 60 | |
64 | 61 | IF !run_pol THEN BEGIN |
65 | 62 | ;This is needed to compute Q,U of both SED and spectra |
66 | - toto=dustem_compute_stokes(*(*!dustem_fit).current_param_values, $ | |
63 | + dustem_predicted_polsed=dustem_compute_stokes(*(*!dustem_fit).current_param_values,bidon, $ | |
67 | 64 | Q_spec=dustem_predicted_Q_spec,U_spec=dustem_predicted_U_spec,PSI_spec=dustem_predicted_PSI_spec, $ |
68 | - dustem_psi_em=dustem_psi_em) | |
69 | - dustem_predicted_Qsed=toto[0] | |
70 | - dustem_predicted_Used=toto[1] | |
65 | + dustem_psi_em,out_st=out_st) | |
66 | + dustem_predicted_Qsed=dustem_predicted_polsed[0] | |
67 | + dustem_predicted_Used=dustem_predicted_polsed[1] | |
71 | 68 | ;Same in extinction, but does not work in polarization extinction was not fitted. |
72 | 69 | ; dustem_predicted_polext=dustem_compute_stokext(*(*!dustem_fit).current_param_values,bidon, $ |
73 | 70 | ; dustem_predicted_Qext,dustem_predicted_Uext, $ | ... | ... |
src/idl/dustemwrap_plot.pro
... | ... | @@ -188,7 +188,7 @@ if isa((*!dustem_data).sed) then begin |
188 | 188 | ;Leaving as is. |
189 | 189 | |
190 | 190 | ;JPB: need here to store values of current parameter values (including plugins) into !iteration_mouchard |
191 | - help,(*!dustem_fit).CURRENT_PARAM_VALUES ;This is not currently filled up ... | |
191 | +; help,(*!dustem_fit).CURRENT_PARAM_VALUES ;This is not currently filled up ... | |
192 | 192 | |
193 | 193 | ;Below will work only for non plugin parameters |
194 | 194 | goto,skip1 | ... | ... |
src/idl/dustemwrap_plot_noobj.pro
... | ... | @@ -92,32 +92,33 @@ END |
92 | 92 | ;This is also necessary for the plotting of the results of the fit (Last iteration) |
93 | 93 | IF not keyword_set(st) THEN BEGIN |
94 | 94 | ;Activation of the plugins is needed because of the plotting of the total emission model that includes them. |
95 | - dustem_activate_plugins,p_dim/(*(*!dustem_fit).param_init_values),st ; 0/0 division case? | |
95 | + dustem_activate_plugins,p_dim/(*(*!dustem_fit).param_init_values),st=st ; 0/0 division case? | |
96 | 96 | |
97 | 97 | ;# Emission |
98 | 98 | ;if isa(!dustem_data.sed) then begin ;using !dustem_data instead of !dustem_show because in this release the user is compelled to fit IQU whether in M or X |
99 | 99 | if not keyword_set(dustem_sed) and isa((*!dustem_data).sed) then begin ;better test? |
100 | 100 | |
101 | - dustem_sed = dustem_compute_sed(p_dim,st,SED_spec) | |
101 | + dustem_sed = dustem_compute_sed(p_dim,st=st,SED_spec=SED_spec) | |
102 | 102 | |
103 | 103 | if !run_pol && !run_lin then begin |
104 | - | |
105 | - dustem_polsed = dustem_compute_polsed(p_dim,st,P_spec,SP_spec,dustem_polfrac) | |
106 | - toto = dustem_compute_stokes(p_dim,st,dustem_qsed,dustem_used,Q_spec,U_spec,PSI_spec,dustem_psi_em) | |
104 | + dustem_polsed = dustem_compute_polsed(p_dim,st=st,P_spec=P_spec,SP_spec=SP_spec,dustem_polfrac=dustem_polfrac) | |
105 | +; the following call need to change to include out instead of dustem_qsed/dustem_used? | |
106 | + toto = dustem_compute_stokes(p_dim,st=st,dustem_qsed,dustem_used,Q_spec=Q_spec,U_spec=U_spec,PSI_spec=PSI_spec,dustem_psi_em=dustem_psi_em) | |
107 | 107 | |
108 | - | |
109 | 108 | endif |
110 | 109 | endif |
111 | 110 | |
112 | 111 | ;# Extinction |
113 | 112 | ; if isa(!dustem_data.ext) then begin |
114 | 113 | if not keyword_set(dustem_ext) and isa((*!dustem_data).ext) then begin |
115 | - dustem_ext = dustem_compute_ext(p_dim,st,EXT_spec) | |
114 | + dustem_ext = dustem_compute_ext(p_dim,st=st,EXT_spec=EXT_spec) | |
116 | 115 | |
117 | 116 | if !run_pol && !run_lin then begin |
118 | 117 | |
119 | - dustem_polext = dustem_compute_polext(p_dim,st,POLEXT_spec,SPEXT_spec,dustem_fpolext) | |
120 | - toto = dustem_compute_stokext(p_dim,st,dustem_qext,dustem_uext,QEXT_spec,UEXT_spec,PSIEXT_spec,dustem_psi_ext) | |
118 | +; the following call need to change to include out instead of dustem_fpolext? | |
119 | + dustem_polext = dustem_compute_polext(p_dim,st=st,polext_spec=POLEXT_spec,spext_spec=SPEXT_spec,dustem_fpolext) | |
120 | +; the following call need to change to include out instead of QEXT/UEXT-spec? | |
121 | + toto = dustem_compute_stokext(p_dim,st=st,dustem_qext,dustem_uext,QEXT_spec=QEXT_spec,UEXT_spec=UEXT_spec,PSIEXT_spe=PSIEXT_spec,dustem_psi_ext=dustem_psi_ext) | |
121 | 122 | |
122 | 123 | endif |
123 | 124 | endif |
... | ... | @@ -128,12 +129,13 @@ ENDIF ELSE BEGIN ;st is provided |
128 | 129 | ;# Emission |
129 | 130 | ;if isa(!dustem_data.sed) then begin |
130 | 131 | if not keyword_set(dustem_sed) and isa((*!dustem_data).sed) then begin |
131 | - dustem_sed = dustem_compute_sed(p_dim,st,SED_spec) | |
132 | + dustem_sed = dustem_compute_sed(p_dim,st=st,SED_spec=SED_spec) | |
132 | 133 | |
133 | 134 | if !run_pol && !run_lin then begin |
134 | 135 | |
135 | - dustem_polsed = dustem_compute_polsed(p_dim,st,P_spec,SP_spec,dustem_polfrac) | |
136 | - toto = dustem_compute_stokes(p_dim,st,dustem_qsed,dustem_used,Q_spec,U_spec,PSI_spec,dustem_psi_em) | |
136 | + dustem_polsed = dustem_compute_polsed(p_dim,st=st,P_spec=P_spec,SP_spec=SP_spec,dustem_polfrac=dustem_polfrac) | |
137 | +; the following call need to change to include out instead of dustem_q/used? | |
138 | + toto = dustem_compute_stokes(p_dim,st=st,dustem_qsed,dustem_used,Q_spec=Q_spec,U_spec=U_spec,PSI_spec=PSI_spec,dustem_psi_em=dustem_psi_em) | |
137 | 139 | ;stop |
138 | 140 | endif |
139 | 141 | endif |
... | ... | @@ -143,12 +145,12 @@ ENDIF ELSE BEGIN ;st is provided |
143 | 145 | |
144 | 146 | if not keyword_set(dustem_ext) and isa((*!dustem_data).ext) then begin |
145 | 147 | |
146 | - dustem_ext = dustem_compute_ext(p_dim,st,EXT_spec) | |
148 | + dustem_ext = dustem_compute_ext(p_dim,st=st,EXT_spec=EXT_spec) | |
147 | 149 | |
148 | 150 | if !run_pol && !run_lin then begin |
149 | 151 | |
150 | - dustem_polext = dustem_compute_polext(p_dim,st,POLEXT_spec,SPEXT_spec,dustem_fpolext) | |
151 | - toto = dustem_compute_stokext(p_dim,st,dustem_qext,dustem_uext,QEXT_spec,UEXT_spec,PSIEXT_spec,dustem_psi_ext) | |
152 | + dustem_polext = dustem_compute_polext(p_dim,st=st,POLEXT_spec=POLEXT_spec,SPEXT_spec=SPEXT_spec,dustem_fpolext) | |
153 | + toto = dustem_compute_stokext(p_dim,st=st,dustem_qext,dustem_uext,QEXT_spec=QEXT_spec,UEXT_spec=UEXT_spec,PSIEXT_spec=PSIEXT_spec,dustem_psi_ext=dustem_psi_ext) | |
152 | 154 | |
153 | 155 | endif |
154 | 156 | endif |
... | ... | @@ -176,7 +178,7 @@ new_mouchard.rchi2=(*!dustem_fit).rchi2 |
176 | 178 | ;Leaving as is. |
177 | 179 | |
178 | 180 | ;JPB: need here to store values of current parameter values (including plugins) into !iteration_mouchard |
179 | -help,(*!dustem_fit).CURRENT_PARAM_VALUES ;This is not currently filled up ... | |
181 | +;help,(*!dustem_fit).CURRENT_PARAM_VALUES ;This is not currently filled up ... | |
180 | 182 | |
181 | 183 | ;Below will work only for non plugin parameters |
182 | 184 | goto,skip1 | ... | ... |