Skip to content

Commit ed7577a

Browse files
authored
Merge pull request #53 from cpp-lln-lab/remi-retinotopy_update
update from retinotopy
2 parents f5e8cac + 6064f28 commit ed7577a

File tree

5 files changed

+26
-8
lines changed

5 files changed

+26
-8
lines changed

checkCFG.m

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212

1313
%% set the expParameters defaults
1414

15-
fieldsToSet.verbose = 0;
15+
fieldsToSet.verbose = false;
1616
fieldsToSet.outputDir = fullfile( ...
1717
fileparts(mfilename('fullpath')), ...
1818
'..', ...
@@ -57,6 +57,7 @@
5757
%% set the cfg defaults
5858

5959
clear fieldsToSet;
60+
fieldsToSet.verbose = false;
6061
fieldsToSet.testingDevice = 'pc';
6162
fieldsToSet.eyeTracker = false;
6263

checkCppBidsDependencies.m

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,25 @@
11
function checkCppBidsDependencies
22

33
pth = fileparts(mfilename('fullpath'));
4-
addpath(fullfile(pth, 'lib', 'JSONio'));
5-
addpath(fullfile(pth, 'lib', 'bids-matlab'));
4+
5+
checkSubmodule(fullfile(pth, 'lib', 'JSONio'))
6+
checkSubmodule(fullfile(pth, 'lib', 'bids-matlab'))
7+
68
addpath(fullfile(pth, 'lib', 'utils'));
79
addpath(fullfile(pth, 'subfun'));
810

9-
printCredits()
11+
printCreditsCppBids();
12+
13+
end
1014

15+
function checkSubmodule(pth)
16+
% If external dir is empty throw an exception
17+
% and ask user to update submodules.
18+
if numel(dir(pth)) <= 2 % Means that the external is empty
19+
error(['Git submodules are not cloned!', ...
20+
'Try this in your terminal:', ...
21+
' git submodule update --recursive ']);
22+
else
23+
addpath(pth);
24+
end
1125
end

createFilename.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,9 @@
3434
expParameters = setFilenames(cfg, expParameters);
3535

3636
talkToMe(cfg, expParameters);
37+
38+
cfg = orderfields(cfg);
39+
expParameters = orderfields(expParameters);
3740

3841
end
3942

printCredits.m renamed to printCreditsCppBids.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
function printCredits()
1+
function printCreditsCppBids()
22

33
version = '0.0.1';
44

saveEventsFile.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -185,7 +185,7 @@
185185
'w');
186186

187187
% print the basic BIDS columns
188-
fprintf(logFile.fileID, '%s\t%s\t%s\t', 'onset', 'duration', 'trial_type');
188+
fprintf(logFile.fileID, '%s\t%s\t%s', 'onset', 'duration', 'trial_type');
189189

190190
printHeaderExtraColumns(logFile);
191191

@@ -207,7 +207,7 @@ function printHeaderExtraColumns(logFile)
207207

208208
headerName = returnHeaderName(namesExtraColumns{iExtraColumn}, nbCol, iCol);
209209

210-
fprintf(logFile.fileID, '%s\t', headerName);
210+
fprintf(logFile.fileID, '\t%s', headerName);
211211

212212
end
213213

@@ -239,7 +239,7 @@ function printHeaderExtraColumns(logFile)
239239
if any(isnan(data))
240240
warning('Missing some %s data for this event.', namesExtraColumns{iExtraColumn});
241241
disp(logFile(iEvent));
242-
elseif all(isnan(data)) || strcmp(data, 'n/a')
242+
elseif all(isnan(data))
243243
warning('Missing %s data for this event.', namesExtraColumns{iExtraColumn});
244244
disp(logFile(iEvent));
245245
end

0 commit comments

Comments
 (0)