Commit fac62b5d authored by Jay Dubb's avatar Jay Dubb
Browse files

v1.24.0

-- Fix problem of acquired datanot loading using the run-levl Load() method standlaone after loading groupResults
-- Fix error when aux doesn't exist in SNIRF file - it's an optinal parameter - so should not cause a file not to load.
-- Add exception handling to Logger to make it more robust - even if log file is loacked or insaccesible it should not cause any errors in Homer3, instaed logging should be replaced with regular fprint's
-- Fix bug in MainGUI DisplayAux, when aux not available we got error
parent 7109c114
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -15,7 +15,7 @@ SNIRF
On

% Last Checked For Update
03-Aug-2020 11:22:34
13-Aug-2020 18:41:27

% Check For Updates
on
@@ -26,5 +26,4 @@ file
% Auto Save Acquisition Files
No


% END
+5 −1
Original line number Diff line number Diff line
@@ -66,6 +66,10 @@ classdef AuxClass < FileLoadSaveClass
            try
                % Open group
                [gid, fid] = HDF5_GroupOpen(fileobj, location);
                if gid<0
                    err = -1;
                    return;
                end

                obj.name            = HDF5_DatasetLoad(gid, 'name');
                obj.dataTimeSeries  = HDF5_DatasetLoad(gid, 'dataTimeSeries');
@@ -75,7 +79,7 @@ classdef AuxClass < FileLoadSaveClass
                % Close group
                HDF5_GroupClose(fileobj, gid, fid);
            catch
                err = -1;
                err = -2;
            end
        end

+4 −2
Original line number Diff line number Diff line
@@ -510,8 +510,10 @@ classdef SnirfClass < AcqDataClass & FileLoadSaveClass
                    err = -6;
                end
                
                %%%% Load aux
                if obj.LoadAux(obj.fid)
                %%%% Load aux. This is an optional field, therefore error must 
                %%%% be less then -1 (-1 means aux is not in SNIRF file) to be 
                %%%% error for whole SNIRF file
                if obj.LoadAux(obj.fid)<-1
                    err = -7;
                end
                
+11 −9
Original line number Diff line number Diff line
@@ -198,11 +198,13 @@ classdef GroupClass < TreeNodeClass
        end
        
        
        % ----------------------------------------------------------------------------------
        % Copy processing params (procInut and procStream.output) from
        % N2 to obj if obj and N2 are equivalent nodes
        % ----------------------------------------------------------------------------------
        function Copy(obj, obj2, conditional)
            % Copy GroupClass object obj2 to GroupClass object obj. Conditional option applies 
            % only to all the runs under this group. If == 'conditional' ONLY derived data, 
            % that is, only from procStream but NOT from acquired data is copied for all the runs. 
            % 
            % Conversly unconditional copy copies all properties in the runs under this group
            if nargin==3 && strcmp(conditional, 'conditional')
                if strcmp(obj.name,obj2.name)
                    for i=1:length(obj.subjs)
@@ -494,7 +496,7 @@ classdef GroupClass < TreeNodeClass
                delete([obj.path, 'groupResults.mat']);
            end
                
            obj.procStream.output.Reset(obj.name);
            obj.procStream.output.Reset(obj.GetFilename);
            if strcmp(option, 'down')
                for jj=1:length(obj.subjs)
                    obj.subjs(jj).Reset();
@@ -588,12 +590,12 @@ classdef GroupClass < TreeNodeClass
                end
            end
            
            % Copy saved group to current group if versions are compatible.
            % obj.CompareVersions==0 means the versions of the saved group
            % and current one are equal.
            % Copy saved group to current group if versions are compatible. obj.CompareVersions==0 
            % means the versions of the saved group and current one are equal.
            if ~isempty(group) && obj.CompareVersions(group)<=0
                % copy procStream.output from previous group to current group for
                % all nodes that still exist in the current group .
                % Do a conditional copy of group from groupResults file. Conditional copy copies ONLY 
                % derived data, that is, only from procStream but NOT acqruired. We do not want to 
                % overwrite the real acquired data loaded from acquisition files 
                hwait = waitbar(0,'Loading group');
                obj.Copy(group, 'conditional');
                close(hwait);
+0 −3
Original line number Diff line number Diff line
@@ -72,9 +72,6 @@ classdef ProcStreamClass < handle
            if ~isa(obj, 'ProcStreamClass')
                return;
            end
            if nargin<3
                reg = RegistriesClass.empty();
            end            
            delete(obj.fcalls);
            obj.fcalls = FuncCallClass().empty();
            for ii=1:length(obj2.fcalls)
Loading