Commit 5f338ddbf17974961d42b2f0e2f07a1d02e29184

Authored by Ilyes Choubani
1 parent 2a8e29d5
Exists in master

Applying correction to run_plugins.

Showing 1 changed file with 16 additions and 12 deletions   Show diff stats
src/idl/dustem_run_plugins.pro
@@ -206,19 +206,23 @@ FOR i=0L,n_elements(param_descs)-1 DO BEGIN @@ -206,19 +206,23 @@ FOR i=0L,n_elements(param_descs)-1 DO BEGIN
206 ENDFOR 206 ENDFOR
207 207
208 ;==============Runnig of the plugins according to their scopes============== 208 ;==============Runnig of the plugins according to their scopes==============
209 - idd=0 209 + ;idd=1
210 210
211 - FOR j=0L,n_elements(scopes)-1 DO BEGIN  
212 -  
213 - if (size(indices))[0] GT 1 then BEGIN  
214 -  
215 - if keyword_set(avoid) then idd *= indices(k,j) else idd += indices(k,j) ;the + is for the case when run_plugins is run with a scopes vector containing more than one element and when the avoid keyword isn't set. ( I do not know when this will occur but in the future, maybe the user will want to run 'ONLY' the plugins in the scopes vector)  
216 -  
217 - ENDIF ELSE idd *= indices(k)  
218 -  
219 211
220 - ENDFOR  
221 - 212 + if keyword_set(avoid) then idd=product(indices[k,*]) else idd=total(indices[k,*])
  213 +
  214 +; FOR j=0L,n_elements(scopes)-1 DO BEGIN
  215 +;
  216 +; if (size(indices))[0] GT 1 then BEGIN
  217 +;
  218 +; if keyword_set(avoid) then idd *= indices(k,j) else idd += indices(k,j) ;the + is for the case when run_plugins is run with a scopes vector containing more than one element and when the avoid keyword isn't set. ( I do not know when this will occur but in the future, maybe the user will want to run 'ONLY' the plugins in the scopes vector)
  219 +;
  220 +;
  221 +; ENDIF ELSE idd *= indices(k)
  222 +;
  223 +;
  224 +; ENDFOR
  225 + stop
222 IF idd GE 1 THEN BEGIN 226 IF idd GE 1 THEN BEGIN
223 227
224 str='((*!dustem_plugin).('+strtrim(k,2)+').spec)=ptr_new('+ftn+'(key=index,val=value)'+')' & str=str(0) 228 str='((*!dustem_plugin).('+strtrim(k,2)+').spec)=ptr_new('+ftn+'(key=index,val=value)'+')' & str=str(0)
@@ -232,7 +236,7 @@ FOR i=0L,n_elements(param_descs)-1 DO BEGIN @@ -232,7 +236,7 @@ FOR i=0L,n_elements(param_descs)-1 DO BEGIN
232 endif 236 endif
233 237
234 238
235 - idd = 0 239 + idd = 1
236 ENDIF 240 ENDIF
237 241
238 242