Unverified Commit 3af6bfea authored by jayd1860's avatar jayd1860 Committed by GitHub
Browse files

Merge pull request #17 from BUNPC/feature-channel-exclude

Manual time point exclusion fixes
parents e90d7f85 4ed90ef1
Loading
Loading
Loading
Loading
+4 −2
Original line number Diff line number Diff line
@@ -169,11 +169,13 @@ classdef ProcInputClass < handle
        
        % ----------------------------------------------------------------------------------
        function val = GetTincMan(obj, iBlk)
            val = {};
            val = [];
            if ~exist('iBlk','var') || isempty(iBlk)
                val = obj.tIncMan;
                val = obj.tIncMan{1};
            elseif ~isempty(obj.tIncMan)
                val = obj.tIncMan{iBlk};
            else  % tInc is invalid or unpopulated
                val = [];
            end
        end
       
+2 −2
Original line number Diff line number Diff line
@@ -1228,9 +1228,9 @@ classdef ProcStreamClass < handle
        % ----------------------------------------------------------------------------------
        function tIncMan = GetTincMan(obj, iBlk)
            if ~exist('iBlk','var')
                iBlk = [];
                iBlk = 1;
            end
            tIncMan = obj.input.GetVar('tIncMan', iBlk);
            tIncMan = obj.input.GetTincMan(iBlk);
        end
        

+6 −3
Original line number Diff line number Diff line
@@ -512,6 +512,10 @@ classdef RunClass < TreeNodeClass
                iBlk = 1;
            end
            tIncMan = obj.procStream.input.GetTincMan(iBlk);
            if isempty(tIncMan)  % If the Tinc array is unitialized TODO find a more sensical place to do this
               obj.InitTincMan();
               tIncMan = obj.procStream.input.GetTincMan(iBlk);
            end
        end
        
        
@@ -535,7 +539,7 @@ classdef RunClass < TreeNodeClass
        
        % ----------------------------------------------------------------------------------
        function InitTincMan(obj)
            iBlk = 1;
            iBlk = 1;  % TODO implement multiple data blocks
            while 1
                t = obj.acquired.GetTime(iBlk);
                if isempty(t)
@@ -546,7 +550,6 @@ classdef RunClass < TreeNodeClass
                iBlk = iBlk+1;
            end
        end              
                
    end        % Public Set/Get methods
    
    
+1 −1
Original line number Diff line number Diff line
@@ -48,7 +48,7 @@ for iBlk = iDataBlks
        end
        col = setColor(mode, ii);
        t = maingui.dataTree.currElem.GetTime(iBlk);
        [h, tPtsExclTot] = drawPatches(t, tInc(:,kk), tPtsExclTot, col, handles);        
        [h, tPtsExclTot] = drawPatches(t, tInc, tPtsExclTot, col, handles);        
        if strcmp(mode,'manual')
            for jj=1:length(h)
                set(h(jj), 'ButtonDownFcn', sprintf('PatchCallback(%d)',jj));
+7 −6
Original line number Diff line number Diff line
@@ -429,7 +429,12 @@ t = tic;
% Set the display status to pending. In order to avoid redisplaying 
% in a single callback thread in functions called from here which 
% also call DisplayData
try
    maingui.dataTree.CalcCurrElem();
catch
    MainGUI_EnableDisableGUI(handles,'on');
    return
end
    
% Restore original selection listboxGroupTree
set(handles.listboxGroupTree, 'value',val0);
@@ -1520,10 +1525,6 @@ for iBlk=1:iDataBlks

end

if isempty(out.format)
    return;
end

% Display excluded time and rejected stims
Display(handles, hObject);