Unverified Commit 6089f97b authored by jayd1860's avatar jayd1860 Committed by GitHub
Browse files

1.77.0 -- Fix stim events TSV issue with conditions names with spaces - we...

1.77.0 -- Fix stim events TSV issue with conditions names with spaces - we should be able to handle that.  (#170)

* v1.77.0

Utils, v1.5.0
-- Fix stim events TSV issue with conditions names with spaces - we should be able to handle that. Change rule to handle spaces and how error reporting is done in readTsv.

DataTree, v1.12.1
-- Don't load events TSV files twice - once in SnirfClass and once in AcqDataClass its superclass.
parent 16805194
Loading
Loading
Loading
Loading
+4 −1
Original line number Diff line number Diff line
@@ -11,6 +11,9 @@ don't ask again
one processing element per file

% Load Stim From TSV File # Yes, No
Yes
No

% Replace TSV File Tabs with Spaces # Yes, No
No

% END
+5 −2
Original line number Diff line number Diff line
@@ -92,7 +92,6 @@ classdef AcqDataClass < matlab.mixin.Copyable
            if ~ischar(fileobj)
                fileobj = '';
            end
            obj.LoadBids(fileobj);           
        end


@@ -162,7 +161,11 @@ classdef AcqDataClass < matlab.mixin.Copyable
            if isempty(file)
                return
            end
            obj.bids.stim = readTsv([filesepStandard(p), file(1).name],'numstr2num');
            [obj.bids.stim, err] = readTsv([filesepStandard(p), file(1).name],'numstr2num');
%             if err < 0
%                 obj.SetError(-8);
%                 return;
%             end
            if isempty(obj.bids.stim)
                return
            end
+4 −1
Original line number Diff line number Diff line
@@ -456,6 +456,9 @@ classdef SnirfClass < AcqDataClass & FileLoadSaveClass
            err = 0;
            
            if obj.LoadStimOverride(obj.GetFilename())
%                 if obj.GetError()<0
%                     err = -1;
%                 end
                return
            end
            
+1 −1
Original line number Diff line number Diff line
@@ -82,7 +82,7 @@ obj.ExportStim();

pause(2);

obj.EditStim();
obj.EditStim(1);

obj.ClosePlots();
dataTree.ReloadStim();
+10 −3
Original line number Diff line number Diff line
@@ -549,7 +549,10 @@ classdef TreeNodeClass < handle
        
        
        % ----------------------------------------------------------------------------------
        function EditStim(obj)
        function EditStim(obj, waitForInput)
            if ~exist('waitForInput','var')
                waitForInput = 0;
            end
            if isempty(obj.acquired)
                MenuBox(sprintf('%s level processing does not have stims. Please select a run to edit stim marks\n', [upper(obj.type(1)), obj.type(2:end)]));
                return;
@@ -578,7 +581,9 @@ classdef TreeNodeClass < handle
                end
                editorTab = editorTabs(ii);
                editorTab.makeActive;
                % MenuBox('Please edit TSV stim file and save it, then click the ''OK'' button.');
                if waitForInput
                    MenuBox('Please edit TSV stim file and save it, then click the ''OK'' button.');
                end
            else
                if ispc()
                    cmd = sprintf('start notepad %s', filenameEvents);
@@ -588,7 +593,9 @@ classdef TreeNodeClass < handle
                    cmd = sprintf('open -a TextEdit %s', filenameEvents);
                    obj.logger.Write('cmd:  "%s"', cmd);
                    system(cmd);                    
                    % MenuBox(sprintf('The events file associated with the current processing element is\n%s\n Open the file in a text editor to modify stim marks', filenameEvents));
                    if waitForInput
                        MenuBox(sprintf('The events file associated with the current processing element is\n%s\n Open the file in a text editor to modify stim marks', filenameEvents));
                    end
                end
            end
        end
Loading