Unverified Commit 28a3bbc6 authored by stephen scott tucker's avatar stephen scott tucker Committed by GitHub
Browse files

v1.30.4 - Procstream order checking (#44)



* prevented ArgClass Extract from indexing into empty list

* FuncCallClass GetInputs and GetOutputs convenience function for returning strings

* GetProcInputs method returns all properties of ProcInputClass for use with proc stream checking

* Processing stream is only run if Check returns zero, else an error msg is raised

* Changed uses of properties to propnames Util fn

* Added explicit list of prereqs to ignore to allow fns like tCCA to work before processing stream has been run

* Added a few more excluded arguments from prereq flagging

* Added Prerequisites to help function

* Registries GetEntryByName function, Proc stream Check rework

* Suppressed debug

* CheckOrder implemented at run, subj, group levels-- only checks runs for now

* Improved string parsing and error dialog on procstream save

* Merge development branch GLM function

* Version 1.30.4

Co-authored-by: default avatardejar14 <67239853+dejar14@users.noreply.github.com>
parent 004530df
Loading
Loading
Loading
Loading
+13 −0
Original line number Diff line number Diff line
@@ -868,6 +868,19 @@ classdef GroupClass < TreeNodeClass
            end            
        end
        
        % ----------------------------------------------------------------------------------
        function [fn_error, missing_args, prereqs] = CheckProcStreamOrder(obj)
            missing_args = {};
            fn_error = 0;
            prereqs = '';
            for i = 1:length(obj.subjs)
                [fn_error, missing_args, prereqs] = obj.subjs(i).CheckProcStreamOrder;
                if ~isempty(missing_args)
                    return
                end
            end
        end
        
        
        % ----------------------------------------------------------------------------------
        function CondNames = GetConditionsActive(obj)
+7 −6
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ classdef ArgClass < matlab.mixin.Copyable
            if size(args,1) > 1
                args = args';
            end
            if size(args, 1) > 0
                if args{1}(1)=='[' || args{1}(1)=='('
                    args{1}(1) = '';
                end
@@ -66,7 +67,7 @@ classdef ArgClass < matlab.mixin.Copyable
                    args{end}(end) = '';
                end 
            end
        
        end        
    end
end
+14 −0
Original line number Diff line number Diff line
@@ -184,6 +184,20 @@ classdef FuncCallClass < handle
        
        
        
        % ------------------------------------------------------------
        function inputs = GetInputs(obj)
           inputs = obj.argIn.Extract(); 
        end
        
        
        
        % ------------------------------------------------------------
        function outputs = GetOutputs(obj)
           outputs = obj.argOut.Extract(); 
        end
            
        
        
        % ----------------------------------------------------------------------------------
        function SetUsageName(obj, usagename)
            if nargin<2
+18 −1
Original line number Diff line number Diff line
@@ -159,6 +159,23 @@ classdef ProcInputClass < handle
            b = obj.acquired.DataModified();
        end
        
        % ----------------------------------------------------------------------------------
        function inputs = GetProcInputs(obj)
            % Get name of each property available from GetVars
            inputs = {};
            p = propnames(obj);
            % Get name of each property
            for i = 1:size(p)
               inputs{end+1} = p{i}; %#ok<AGROW>
               pi = propnames(obj.(p{i}));
               % Get name of each sub-property (properties of misc, acquired)
               for j = 1:size(pi)
                  inputs{end+1} = pi{j};  %#ok<AGROW>
               end
            end
            
        end
        
    end
        
    
+1 −2
Original line number Diff line number Diff line
@@ -542,7 +542,6 @@ classdef ProcStreamClass < handle
    
    end
    
    
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
    % Methods for loading / saving proc stream config file.
    %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Loading