Commit 5cb0080802e40058591e0cc88d6a84a45e5e206c
1 parent
f59b4fee
Exists in
master
added some commented stops
Showing
4 changed files
with
35 additions
and
17 deletions
Show diff stats
src/idl/dustem_compute_stokes.pro
... | ... | @@ -97,7 +97,14 @@ IF scopes[0] NE 'NONE' THEN BEGIN |
97 | 97 | |
98 | 98 | ENDIF |
99 | 99 | ;----------------------------------------- |
100 | +ind=where(finite(U_spec) NE 1 OR finite(Q_spec) NE 1,count) | |
101 | +IF count NE 0 THEN BEGIN | |
102 | + message,'Q or U is NaN',/continue | |
103 | + stop | |
104 | +ENDIF | |
100 | 105 | PSI_spec = 0.5*atan(U_spec,Q_spec)/degtorad |
106 | +polar_iqu2ippsi,stI,Q_spec,U_spec,p_bidon,PSI_spec | |
107 | +;stop | |
101 | 108 | |
102 | 109 | ;INITIALIZING THE STOKES SEDS |
103 | 110 | dustem_qsed = (*!dustem_data.qsed).values * 0. |
... | ... | @@ -154,6 +161,7 @@ out_st=st |
154 | 161 | ;generating interpolates for Psi_em |
155 | 162 | dustem_psi_em = 0.5*atan(dustem_used,dustem_qsed)/degtorad |
156 | 163 | |
164 | +;stop | |
157 | 165 | |
158 | 166 | ;clean pointers |
159 | 167 | heap_gc | ... | ... |
src/idl/dustem_mpfit_run.pro
... | ... | @@ -162,6 +162,7 @@ FOR i_tag=0,count_data_tag-1 DO BEGIN |
162 | 162 | 'QSED': BEGIN |
163 | 163 | |
164 | 164 | toto = dustem_compute_stokes(p_dim,st,dustem_qsed,dustem_used,Q_spec,U_spec,PSI_spec,dustem_psi_em) |
165 | + ;stop | |
165 | 166 | |
166 | 167 | ;taking care of the color correction for spass ; SHOULD NOT LEAVE THIS ON |
167 | 168 | ;dustem_qsed(-1)=dustem_qsed(-2) | ... | ... |
src/idl/dustemcgwin_dataset.pro
... | ... | @@ -1133,6 +1133,8 @@ if keyword_set(dataset) then begin |
1133 | 1133 | |
1134 | 1134 | 'PSI_EM': begin ;will be copying code from qsed and hopefully it will work. NB: THIS IS FALSE . YOU DO NOT NEED A LOGARITHMIC AXIS |
1135 | 1135 | |
1136 | + ;stop | |
1137 | + | |
1136 | 1138 | idx_filt=where((*!dustem_data.psi_em).filt_names NE 'SPECTRUM',ct_filt) |
1137 | 1139 | idx_spec=where((*!dustem_data.psi_em).filt_names EQ 'SPECTRUM',ct_spec) |
1138 | 1140 | |
... | ... | @@ -1164,7 +1166,7 @@ if keyword_set(dataset) then begin |
1164 | 1166 | cgoplot,st.polsed.wav,0.5*atan(specugrain,specqgrain)/degtorad,pos=position,noerase=1,color=use_cols[i],xr=xr,/xlog,ytickformat='(A1)',yr=[-90.00,90.00] |
1165 | 1167 | endif |
1166 | 1168 | ENDFOR |
1167 | - | |
1169 | + ;stop | |
1168 | 1170 | ;Plotting of the plugins. |
1169 | 1171 | for i=0L,n_plgns-1 do begin |
1170 | 1172 | |
... | ... | @@ -1175,7 +1177,7 @@ if keyword_set(dataset) then begin |
1175 | 1177 | ENDIF |
1176 | 1178 | ENDIF |
1177 | 1179 | endfor |
1178 | - | |
1180 | + ;stop | |
1179 | 1181 | ;PLotting of the interpolates corresponding to spectrum and filter points |
1180 | 1182 | |
1181 | 1183 | IF ct_spec NE 0 THEN BEGIN |
... | ... | @@ -1184,19 +1186,20 @@ if keyword_set(dataset) then begin |
1184 | 1186 | yy=dustem_interp[idx_spec] |
1185 | 1187 | cgoplot,xx,yy,color='Indian Red',pos=position,psym=7,syms=2,noerase=1 |
1186 | 1188 | ENDIF |
1187 | - | |
1189 | + ;stop | |
1188 | 1190 | |
1189 | 1191 | IF ct_filt NE 0 THEN BEGIN |
1190 | 1192 | xx=((*!dustem_data.psi_em).wav)[idx_filt] |
1191 | 1193 | yy=dustem_interp[idx_filt] |
1192 | 1194 | cgoplot,xx,yy,color='red',pos=position,psym=6,syms=2,noerase=1 |
1193 | 1195 | ENDIF |
1194 | - | |
1196 | + ;stop | |
1195 | 1197 | |
1196 | 1198 | ;Plotting of the total dust emission spectrum |
1197 | 1199 | ;cgoplot,st.sed.wav,0.5*atan(specu,specq)/degtorad,pos=position,noerase=1,/xlog,/ys,/xs |
1198 | 1200 | cgoplot,st.sed.wav,dustem_spec,pos=position,noerase=1,/xlog,/ys,/xs |
1199 | - | |
1201 | + ;stop | |
1202 | + | |
1200 | 1203 | endif else begin ;The data points in the plot that remain unchanged. |
1201 | 1204 | |
1202 | 1205 | ... | ... |
src/idl/dustemwrap_plot.pro
1 | 1 | PRO dustemwrap_plot,p_dim,st,dustem_sed,SED_spec,dustem_qsed,Q_spec,dustem_used,U_spec,dustem_polsed,P_spec,dustem_polfrac,SP_spec,dustem_psi_em,PSI_spec,dustem_ext,EXT_spec,dustem_qext,QEXT_spec,dustem_uext,UEXT_spec,dustem_polext,POLEXT_spec,dustem_fpolext,SPEXT_spec,dustem_psi_ext,PSIEXT_spec,_extra=_extra |
2 | 2 | |
3 | +;stop | |
3 | 4 | |
4 | 5 | ;This is also necessary for the plotting of the results of the fit (Last iteration) |
5 | 6 | IF not keyword_set(st) THEN BEGIN |
... | ... | @@ -17,7 +18,7 @@ IF not keyword_set(st) THEN BEGIN |
17 | 18 | |
18 | 19 | dustem_polsed = dustem_compute_polsed(p_dim,st,P_spec,SP_spec,dustem_polfrac) |
19 | 20 | toto = dustem_compute_stokes(p_dim,st,dustem_qsed,dustem_used,Q_spec,U_spec,PSI_spec,dustem_psi_em) |
20 | - | |
21 | + ;stop | |
21 | 22 | |
22 | 23 | endif |
23 | 24 | endif |
... | ... | @@ -36,7 +37,8 @@ IF not keyword_set(st) THEN BEGIN |
36 | 37 | endif |
37 | 38 | |
38 | 39 | ENDIF ELSE BEGIN ;st is provided |
39 | - | |
40 | + ;stop | |
41 | + | |
40 | 42 | ;# Emission |
41 | 43 | ;if isa(!dustem_data.sed) then begin |
42 | 44 | if not keyword_set(dustem_sed) and isa(!dustem_data.sed) then begin |
... | ... | @@ -46,7 +48,7 @@ ENDIF ELSE BEGIN ;st is provided |
46 | 48 | |
47 | 49 | dustem_polsed = dustem_compute_polsed(p_dim,st,P_spec,SP_spec,dustem_polfrac) |
48 | 50 | toto = dustem_compute_stokes(p_dim,st,dustem_qsed,dustem_used,Q_spec,U_spec,PSI_spec,dustem_psi_em) |
49 | - | |
51 | + ;stop | |
50 | 52 | endif |
51 | 53 | endif |
52 | 54 | |
... | ... | @@ -66,7 +68,7 @@ ENDIF ELSE BEGIN ;st is provided |
66 | 68 | endif |
67 | 69 | |
68 | 70 | ENDELSE |
69 | - | |
71 | +;stop | |
70 | 72 | |
71 | 73 | ;if ~windowavailable(cgquery()) then begin |
72 | 74 | |
... | ... | @@ -163,11 +165,11 @@ endif else begin |
163 | 165 | res = (*(*!dustem_fit).param_init_values)*0.;+la_undef() |
164 | 166 | |
165 | 167 | endelse |
166 | - | |
168 | +;stop | |
167 | 169 | if test_m then begin |
168 | 170 | ;Generating emission window and saving window ID |
169 | 171 | |
170 | - if iswinsed then begin | |
172 | + if iswinsed then begin ;This is when the cgwindow does not exist already | |
171 | 173 | |
172 | 174 | if !run_pol then cgwindow,wxsize=910,wysize=658,wtitle='DUSTEMWRAP v2.0 (EMISSION)' else cgwindow, wtitle='DUSTEMWRAP v2.0 (EMISSION)';, wback='grey';,wobject=winobj_m |
173 | 175 | winid_m = cgquery(dimensions=dim_m,/current) ;this has to be changed because the dimensions of this array change with the data sets present (extinction/emission). |
... | ... | @@ -188,7 +190,8 @@ if test_m then begin |
188 | 190 | ;Plotting of the number of runs |
189 | 191 | ;Getting the width of the unrefreshed string |
190 | 192 | widthtot=0. |
191 | - cgtext, xxpos, yypos,'Runs : ',color=0,/normal,charsize=-1,width=thiswidth,/addcmd & cmdind_m+=1 | |
193 | + ;cgtext, xxpos, yypos,'Runs : ',color=0,/normal,charsize=-1,width=thiswidth,/addcmd & cmdind_m+=1 | |
194 | + cgtext, xxpos, yypos,'Iteration : ',color=0,/normal,charsize=-1,width=thiswidth,/addcmd & cmdind_m+=1 | |
192 | 195 | widthtext = thiswidth |
193 | 196 | widthtot+= thiswidth ;fixed width |
194 | 197 | !dustemcgwin_ncmds.runs.txtwdth = thiswidth |
... | ... | @@ -202,7 +205,8 @@ if test_m then begin |
202 | 205 | yypos = 0.015 |
203 | 206 | |
204 | 207 | ;Displaying fixed part |
205 | - cgtext, xxpos, yypos,'Runs : ',color=0,/normal,charsize = 1.35,/addcmd & cmdind_m+=1 | |
208 | + ;cgtext, xxpos, yypos,'Runs : ',color=0,/normal,charsize = 1.35,/addcmd & cmdind_m+=1 | |
209 | + cgtext, xxpos, yypos,'Iteration : ',color=0,/normal,charsize = 1.35,/addcmd & cmdind_m+=1 | |
206 | 210 | ;Displaying refreshed part (first run . This is the command that will be replaced) |
207 | 211 | cgtext, xxpos + widthtext + 0.015 , yypos,strtrim(!dustem_iter.act,2),color=0,/normal,charsize = 1.0,/addcmd & cmdind_m+=1 |
208 | 212 | ;saving the command id to replace it |
... | ... | @@ -285,7 +289,7 @@ if test_m then begin |
285 | 289 | |
286 | 290 | !dustemcgwin_ncmds.pltit.pl = cmdind_m |
287 | 291 | |
288 | - endif else begin | |
292 | + endif else begin ;This is when the cgwindow exists already | |
289 | 293 | |
290 | 294 | |
291 | 295 | winid_m = !dustemcgwin_id.sed |
... | ... | @@ -490,7 +494,7 @@ if test_m then begin |
490 | 494 | cgwindow,'dustemcgwin_dataset', st, dataset='psi_em', /nodata, position=p_psised, /addcmd, winid=winid_m, _extra=_extra & cmdind_m+=1 |
491 | 495 | |
492 | 496 | endif else begin ;psi_em exists |
493 | - | |
497 | + ;stop | |
494 | 498 | if ~iswinsed then begin |
495 | 499 | cmdind_m = !dustemcgwin_ncmds.psi_em.pl |
496 | 500 | cgwindow,'dustemcgwin_dataset', st, dustem_psi_em,PSI_spec,SED_spec, dataset='psi_em', /refresh ,position=p_psised, winid=winid_m,/replacecmd,cmdindex=cmdind_m, _extra=_extra |
... | ... | @@ -607,7 +611,8 @@ if test_x then begin |
607 | 611 | ;Plotting of the number of runs |
608 | 612 | ;Getting the width of the unrefreshed string |
609 | 613 | widthtot=0. |
610 | - cgtext, xxpos, yypos,'Runs : ',color=0,/normal,charsize=-1,width=thiswidth,/addcmd & cmdind_x+=1 | |
614 | + ;cgtext, xxpos, yypos,'Runs : ',color=0,/normal,charsize=-1,width=thiswidth,/addcmd & cmdind_x+=1 | |
615 | + cgtext, xxpos, yypos,'Iteration : ',color=0,/normal,charsize=-1,width=thiswidth,/addcmd & cmdind_x+=1 | |
611 | 616 | widthtext = thiswidth |
612 | 617 | widthtot+= thiswidth ;fixed width |
613 | 618 | !dustemcgwin_ncmds.runs.txtwdth = thiswidth |
... | ... | @@ -621,7 +626,8 @@ if test_x then begin |
621 | 626 | yypos = 0.015 |
622 | 627 | |
623 | 628 | ;Displaying fixed part |
624 | - cgtext, xxpos, yypos,'Runs : ',color=0,/normal,charsize = 1.35,/addcmd & cmdind_x+=1 | |
629 | + ;cgtext, xxpos, yypos,'Runs : ',color=0,/normal,charsize = 1.35,/addcmd & cmdind_x+=1 | |
630 | + cgtext, xxpos, yypos,'Iteration : ',color=0,/normal,charsize = 1.35,/addcmd & cmdind_x+=1 | |
625 | 631 | ;Displaying refreshed part (first run . This is the command that will be replaced) |
626 | 632 | cgtext, xxpos + widthtext + 0.015 , yypos,strtrim(!dustem_iter.act,2),color=0,/normal,charsize = 1.0,/addcmd & cmdind_x+=1 |
627 | 633 | ;saving the command id to replace it | ... | ... |