Commit 79991f38e3cc8d65346b689a4f11d99ab1c6e96e
1 parent
9331f1cd
Exists in
master
fixed for whan scope=NONE
Showing
2 changed files
with
12 additions
and
6 deletions
Show diff stats
src/idl/dustem_compute_sed.pro
... | ... | @@ -59,9 +59,12 @@ spec = st.sed.em_tot * fact |
59 | 59 | |
60 | 60 | ;ADDING PLUGIN TO SPECTRUM---------------- |
61 | 61 | ;if n_tags(!dustem_data.sed) gt 1 then begin ; executing only when !dustem_data.sed is set meaning that this allows for the creation of fake seds |
62 | -for i=0L,n_tags(*!dustem_scope)-1 do begin | |
63 | -if total(strsplit((*(*!dustem_scope).(i)),'+',/extract) eq 'ADD_SED') then spec+=(*(*!dustem_plugin).(i))[*,0] | |
64 | -endfor | |
62 | +scopes=tag_names((*!dustem_scope)) | |
63 | +IF scopes[0] NE 'NONE' THEN BEGIN | |
64 | + for i=0L,n_tags(*!dustem_scope)-1 do begin | |
65 | + if total(strsplit((*(*!dustem_scope).(i)),'+',/extract) eq 'ADD_SED') then spec+=(*(*!dustem_plugin).(i))[*,0] | |
66 | + endfor | |
67 | +ENDIF | |
65 | 68 | ;endif |
66 | 69 | ;------------------------------------------ |
67 | 70 | ... | ... |
src/idl/dustem_plot_fit_sed.pro
... | ... | @@ -92,9 +92,12 @@ spec = st.sed.em_tot * fact |
92 | 92 | |
93 | 93 | ;ADDING PLUGIN(S) TO SPECTRUM---------------- |
94 | 94 | ;if n_tags(!dustem_data.sed) gt 1 then begin |
95 | -FOR i=0L,n_tags(*!dustem_scope)-1 DO BEGIN | |
96 | - IF total(strsplit((*(*!dustem_scope).(i)),'+',/extract) EQ 'ADD_SED') THEN spec+=(*(*!dustem_plugin).(i))[*,0] | |
97 | -ENDFOR | |
95 | +scopes=tag_names((*!dustem_scope)) | |
96 | +IF scopes[0] NE 'NONE' THEN BEGIN | |
97 | + FOR i=0L,n_tags(*!dustem_scope)-1 DO BEGIN | |
98 | + IF total(strsplit((*(*!dustem_scope).(i)),'+',/extract) EQ 'ADD_SED') THEN spec+=(*(*!dustem_plugin).(i))[*,0] | |
99 | + ENDFOR | |
100 | +ENDIF | |
98 | 101 | ;endif |
99 | 102 | ;------------------------------------------ |
100 | 103 | ... | ... |