From 5f338ddbf17974961d42b2f0e2f07a1d02e29184 Mon Sep 17 00:00:00 2001 From: ichoubani Date: Wed, 2 Nov 2022 08:51:07 +0100 Subject: [PATCH] Applying correction to run_plugins. --- src/idl/dustem_run_plugins.pro | 28 ++++++++++++++++------------ 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/src/idl/dustem_run_plugins.pro b/src/idl/dustem_run_plugins.pro index d4f3304..7fdd90d 100644 --- a/src/idl/dustem_run_plugins.pro +++ b/src/idl/dustem_run_plugins.pro @@ -206,19 +206,23 @@ FOR i=0L,n_elements(param_descs)-1 DO BEGIN ENDFOR ;==============Runnig of the plugins according to their scopes============== - idd=0 + ;idd=1 - FOR j=0L,n_elements(scopes)-1 DO BEGIN - - if (size(indices))[0] GT 1 then BEGIN - - 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) - - ENDIF ELSE idd *= indices(k) - - ENDFOR - + if keyword_set(avoid) then idd=product(indices[k,*]) else idd=total(indices[k,*]) + +; FOR j=0L,n_elements(scopes)-1 DO BEGIN +; +; if (size(indices))[0] GT 1 then BEGIN +; +; 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) +; +; +; ENDIF ELSE idd *= indices(k) +; +; +; ENDFOR + stop IF idd GE 1 THEN BEGIN 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 endif - idd = 0 + idd = 1 ENDIF -- libgit2 0.21.2