Skip to content

Commit c6e2c9e

Browse files
committed
v1.84.1
-- Reduce the amount of print statements to console. -- Improve StimClass object comparison to avoid detecting false changes to stimulus set (i.e., Two StimClass objects should be equal if their stimulus combination set is identical regardless of the order in which the stims are listed in the TSV file or in the Snirf.stim field) -- Add minor but convenient menu item to View menu in MainGUI to be able to hide stims to be able to look at the time course unobstructed by stim onset lines * Utils, 1.8.2 -- Reduce the amount of print statements to console. Provide WriteFileOnly method in Logger class. * DataTree, 1.20.1 -- Reduce the amount of print statements to console. Remove 'Initializing empty derived data output file ...' and 'Attempting to load ***-level proc stream from ...' and 'Saving group ...'
1 parent c5639e2 commit c6e2c9e

File tree

11 files changed

+49
-18
lines changed

11 files changed

+49
-18
lines changed

DataTree/AcquiredData/Snirf/StimClass.m

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -228,7 +228,9 @@ function Copy(obj, obj2)
228228
end
229229

230230
% Now check contents
231-
if ~all( abs(obj.data(:)-obj2.data(:)) < (obj.errmargin/10) )
231+
d1 = sortrows(obj.data);
232+
d2 = sortrows(obj2.data);
233+
if ~all( abs(d1(:)-d2(:)) < (obj.errmargin/10) )
232234
return;
233235
end
234236

DataTree/DataTreeClass.m

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -788,7 +788,6 @@ function Save(obj, hwait)
788788

789789
t1 = tic;
790790
for ii = 1:length(obj.groups)
791-
obj.logger.Write('Saving group %d in %s\n', ii, [obj.groups(ii).pathOutputAlt, obj.groups(ii).GetFilename()]);
792791
obj.groups(ii).Save(hwait);
793792
end
794793
obj.logger.Write('Completed saving processing results for all groups in %0.3f seconds.\n', toc(t1));

DataTree/GroupClass.m

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -308,9 +308,7 @@ function Add(obj, subj, sess, run)
308308
if ~exist(fnameFull, 'file')
309309
procStreamDefault.SaveConfigFile(fnameFull, o.type);
310310
end
311-
312-
obj.logger.Write('Attempting to load %s-level proc stream from %s\n', o.type, fnameFull);
313-
311+
314312
% Load file to the first empty procStream in the dataTree at each processing level
315313
err = o.LoadProcStreamConfigFile(fnameFull);
316314

@@ -329,7 +327,7 @@ function Add(obj, subj, sess, run)
329327
% disseminate it to all subjects and all runs in this group
330328
else
331329

332-
obj.logger.Write('Loading proc stream from %s\n', fnameFull);
330+
obj.logger.Write('Loading %s-level proc stream from %s\n', o.type, fnameFull);
333331
g.CopyFcalls(o.procStream, o.type);
334332

335333
end
@@ -694,7 +692,7 @@ function Save(obj, hwait)
694692
return
695693
end
696694

697-
obj.logger.Write('Saving processed data in %s\n', [obj.path, obj.outputDirname, obj.outputFilename]);
695+
obj.logger.Write('Saving group tree processing stream input in %s\n', [obj.path, obj.outputDirname, obj.outputFilename]);
698696

699697
if ishandle(hwait)
700698
obj.logger.Write('Auto-saving processing results ...\n', obj.logger.ProgressBar(), hwait);

DataTree/ProcStream/ProcResultClass.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,7 @@ function SaveInit(obj, pathname, filename)
283283
end
284284
output = ProcResultClass();
285285

286-
obj.logger.Write(sprintf('Initializing empty derived data output file: %s', [filesepStandard(pathname), filename, '.mat']));
286+
obj.logger.WriteFileOnly(sprintf('Initializing empty derived data output file: %s', [filesepStandard(pathname), filename, '.mat']), 661, 529, 23);
287287
save([filesepStandard(pathname), filename, '.mat'], '-mat', 'output');
288288
end
289289

DataTree/ProcStream/ProcStreamClass.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -410,7 +410,7 @@ function ExportProcStream(obj, filename, fcalls)
410410
[p,f] = fileparts(temp);
411411
fname = [filesepStandard(p), f, '_processing.json'];
412412
if strcmpi(cfg.GetValue('Export Processing Stream Functions'), 'yes')
413-
logger.Write('Saving processing stream %s:\n', fname);
413+
logger.Write('Saving processing stream function call chain in %s:\n', fname);
414414
appname = sprintf('%s', getNamespace());
415415
vernum = sprintf('v%s', getVernum(appname));
416416
dt = sprintf('%s', char(datetime(datetime, 'Format','MMMM d, yyyy, HH:mm:ss')));

DataTree/Version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.20.0
1+
1.20.1

MainGUI/MainGUI.fig

824 Bytes
Binary file not shown.

MainGUI/MainGUI.m

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1199,6 +1199,11 @@ function UpdateChildGuis(handles)
11991199
% ----------------------------------------------------------------------------------
12001200
function DisplayStim(handles, hAxes)
12011201
global maingui
1202+
1203+
if strcmp(get(handles.menuItemHideStims, 'checked'), 'on')
1204+
return;
1205+
end
1206+
12021207
dataTree = maingui.dataTree;
12031208
procElem = dataTree.currElem;
12041209

@@ -2264,3 +2269,16 @@ function menuItemExportStim_Callback(~, ~, ~)
22642269
function menuItemReloadStim_Callback(hObject, ~, handles)
22652270
global maingui
22662271
maingui.dataTree.currElem.EditStim();
2272+
2273+
2274+
2275+
2276+
% --------------------------------------------------------------------
2277+
function menuItemHideStims_Callback(hObject, ~, handles)
2278+
if strcmp(get(hObject, 'checked'), 'on')
2279+
set(hObject, 'checked','off');
2280+
elseif strcmp(get(hObject, 'checked'), 'off')
2281+
set(hObject, 'checked','on');
2282+
end
2283+
DisplayData(handles, hObject);
2284+

Utils/Shared/Logger.m

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,20 @@ function WriteNoFmt(self, s, options, hwait)
194194

195195

196196

197+
% -------------------------------------------------
198+
function WriteFileOnly(self, s, varargin)
199+
optionsValueOrig = self.options.value;
200+
self.SetFileOnly();
201+
if isempty(varargin)
202+
self.Write(s, varargin);
203+
else
204+
self.Write(s, varargin{:});
205+
end
206+
self.options.value = optionsValueOrig;
207+
end
208+
209+
210+
197211
% -------------------------------------------------
198212
function ct = CurrTime(self, msg, options, hwait)
199213
ct = '';
@@ -363,22 +377,22 @@ function SetDebugLevel(self, options)
363377

364378

365379
% -------------------------------------------------
366-
function val = FileOnly(self)
367-
val = self.options.FILE_ONLY;
380+
function SetFileOnly(self)
381+
self.options.value = self.options.FILE_ONLY;
368382
end
369383

370384

371385

372386
% -------------------------------------------------
373-
function val = Null(self)
374-
val = self.options.NULL;
387+
function SetConsoleOnly(self)
388+
self.options.value = self.options.CONSOLE_ONLY;
375389
end
376390

377391

378392

379393
% -------------------------------------------------
380-
function val = ConsoleOnly(self)
381-
val = self.options.CONSOLE_ONLY;
394+
function val = Null(self)
395+
val = self.options.NULL;
382396
end
383397

384398

Utils/Shared/Version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.8.1
1+
1.8.2

Version.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
1.84.0
1+
1.84.1

0 commit comments

Comments
 (0)