Commit 205a3485 authored by Jay Dubb's avatar Jay Dubb
Browse files

v1.31.16

-- Fix some bugs in ExportHRF where ONLY the first run was being exported while the rest were being skipped because the HRF data was not being loaded.
-- Save ExportHRF output files in same folders as the other derived data such as HRF. Previously ExportHRF followed it's own rules for which folder to save in.
-- Clean up ExportHRF code a little by consolidating common code in base class TreeNodeClass.
-- Remove unnecessary Load call from TreeNodeClass.Load();
-- Fix small issue with Reset() in data tree
parent 5a544615
Loading
Loading
Loading
Loading
+4 −4
Original line number Diff line number Diff line
@@ -742,12 +742,12 @@ classdef GroupClass < TreeNodeClass
                iBlk = 1;
            end
            
            obj.procStream.ExportHRF(obj.GetOutputFilename, obj.CondNames, iBlk);
            if strcmp(procElemSelect, 'all')
                for ii = 1:length(obj.subjs)
                    obj.subjs(ii).ExportHRF('all', iBlk);
                end
            end            
            obj.ExportHRF@TreeNodeClass(procElemSelect, iBlk);            
        end

        
+3 −0
Original line number Diff line number Diff line
@@ -898,6 +898,9 @@ classdef ProcResultClass < handle
            % Generate table cells
            tblcells = obj.GenerateTableCells_HRF(CondNames, iBlk);
            
            [p, f] = fileparts(obj.SetFilename(filename));
            filename = [filesepStandard(p, 'nameonly:dir'), f];
            
            % Create table export data to file
            tbl = ExportTable(filename, 'HRF', tblcells);
        end
+1 −1
Original line number Diff line number Diff line
@@ -848,7 +848,7 @@ classdef RunClass < TreeNodeClass
            if ~exist('iBlk','var') || isempty(iBlk)
                iBlk = 1;
            end
            obj.procStream.ExportHRF(obj.GetOutputFilename, obj.CondNames, iBlk);
            obj.ExportHRF@TreeNodeClass('', iBlk);
        end

        
+4 −4
Original line number Diff line number Diff line
@@ -639,12 +639,12 @@ classdef SubjClass < TreeNodeClass
                iBlk = 1;
            end

            obj.procStream.ExportHRF(obj.GetOutputFilename, obj.CondNames, iBlk);
            if strcmp(procElemSelect, 'all')
                for ii = 1:length(obj.runs)
                    obj.runs(ii).ExportHRF(iBlk);
                end
            end            
            obj.ExportHRF@TreeNodeClass(procElemSelect, iBlk);
        end
    
        
+18 −3
Original line number Diff line number Diff line
@@ -158,8 +158,8 @@ classdef TreeNodeClass < handle
        
        % ----------------------------------------------------------------------------------
        function Reset(obj)
            obj.procStream.output.Reset(obj.GetOutputFilename);
            delete([obj.GetOutputFilename, '*.txt']);
            obj.procStream.output.Reset([obj.path, obj.GetOutputFilename()]);
            delete([obj.path, obj.GetOutputFilename(), '*.txt']);
            delete([obj.path, 'tCCAfilter_*.txt'])
        end
        
@@ -648,7 +648,6 @@ classdef TreeNodeClass < handle
                return
            end
            err = obj.LoadSubBranch(); %#ok<*MCNPN>
            obj.procStream.Load([obj.path, obj.GetOutputFilename]);
        end
        
        
@@ -662,6 +661,22 @@ classdef TreeNodeClass < handle
        end
        

        % ----------------------------------------------------------------------------------
        function ExportHRF(obj, ~, iBlk)

            % Update call application GUI using it's generic Update function
            if ~isempty(obj.updateParentGui)
                obj.updateParentGui('DataTreeClass', [obj.iGroup, obj.iSubj, obj.iRun]);
            end
            
            % Load derived data and export it
            obj.procStream.Load([obj.path, obj.GetOutputFilename()]);
            obj.procStream.ExportHRF([obj.path, obj.GetOutputFilename()], obj.CondNames, iBlk);
            pause(.5);
        end
        
        
        
        % ----------------------------------------------------------------------------------
        function tblcells = ExportMeanHRF(~, ~, ~)
            tblcells = {};
Loading