Skip to content

Commit 6685f21

Browse files
committed
Merge remote-tracking branch 'cpp-lln-lab/master'
2 parents fff81a9 + b69e00e commit 6685f21

File tree

12 files changed

+584
-578
lines changed

12 files changed

+584
-578
lines changed

.travis.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,4 +31,4 @@ before_script:
3131
- cd tests
3232

3333
script:
34-
- octave $OCTFLAGS --eval "results = runtests; assert(all(~[results.Failed]))"
34+
- octave $OCTFLAGS --eval "results = runTests; assert(all(~[results.Failed]))"

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@
1616
- [Contributing](#contributing)
1717
- [Guidestyle](#guidestyle)
1818
- [BIDS naming convention](#bids-naming-convention)
19+
- [Contributors ✨](#contributors-)
1920

2021
<!-- /TOC -->
2122

@@ -184,7 +185,8 @@ Feel free to open issues to report a bug and ask for improvements.
184185
### Guidestyle
185186

186187
- We use camelCase.
187-
- We keep the McCabe complexity as reported by the [check_my_code function](https://github.com/Remi-Gau/matlab_checkcode) below 15.
188+
- We keep the McCabe complexity as reported by the [check_my_code function](https://github.com/Remi-Gau/check_my_code) below 15.
189+
- We use the [MISS_HIT linter](https://florianschanda.github.io/miss_hit/style_checker.html) to automatically fix some linting issues.
188190

189191
### BIDS naming convention
190192

checkCFG.m

Lines changed: 45 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -1,57 +1,56 @@
11
function [expParameters, cfg] = checkCFG(cfg, expParameters)
2-
% check that we have all the fields that we need in the experiment
3-
% parameters
2+
% check that we have all the fields that we need in the experiment
3+
% parameters
44

5-
if ~isfield(expParameters, 'verbose') || isempty(expParameters.verbose)
6-
expParameters.verbose = 0;
7-
end
5+
if ~isfield(expParameters, 'verbose') || isempty(expParameters.verbose)
6+
expParameters.verbose = 0;
7+
end
88

9-
if ~isfield(expParameters, 'outputDir')
10-
expParameters.outputDir = fullfile(...
11-
fileparts(mfilename('fullpath')), ...
12-
'..', ...
13-
'output');
14-
end
9+
if ~isfield(expParameters, 'outputDir')
10+
expParameters.outputDir = fullfile( ...
11+
fileparts(mfilename('fullpath')), ...
12+
'..', ...
13+
'output');
14+
end
1515

16-
% set empty values for a series of field if they have not been specified
17-
% 'ce'
18-
% 'dir' For BIDS file naming: phase encoding direction of acquisition for fMRI
19-
% 'rec' For BIDS file naming: reconstruction of fMRI images
20-
% 'echo' For BIDS file naming: echo fMRI images
21-
% 'acq' For BIDS file naming: acquisition of fMRI images
22-
% 'subjectGrp' in case no group was provided
23-
% 'sessionNb' in case no session was provided
24-
25-
fields2Check = { ...
26-
'ce', ...
27-
'dir', ...
28-
'rec', ...
29-
'echo', ...
30-
'acq', ...
31-
'subjectGrp', ...
32-
'sessionNb'};
33-
34-
for iField = 1:numel(fields2Check)
35-
if ~isfield(expParameters, fields2Check{iField})
36-
expParameters = setfield(expParameters, fields2Check{iField}, []); %#ok<SFLD>
16+
% set empty values for a series of field if they have not been specified
17+
% 'ce'
18+
% 'dir' For BIDS file naming: phase encoding direction of acquisition for fMRI
19+
% 'rec' For BIDS file naming: reconstruction of fMRI images
20+
% 'echo' For BIDS file naming: echo fMRI images
21+
% 'acq' For BIDS file naming: acquisition of fMRI images
22+
% 'subjectGrp' in case no group was provided
23+
% 'sessionNb' in case no session was provided
24+
25+
fields2Check = { ...
26+
'ce', ...
27+
'dir', ...
28+
'rec', ...
29+
'echo', ...
30+
'acq', ...
31+
'subjectGrp', ...
32+
'sessionNb'};
33+
34+
for iField = 1:numel(fields2Check)
35+
if ~isfield(expParameters, fields2Check{iField})
36+
expParameters = setfield(expParameters, fields2Check{iField}, []); %#ok<SFLD>
37+
end
3738
end
38-
end
3939

40-
% set false value for a series of field if they have not been specified
41-
fields2CheckFalse = { ...
42-
'eyeTracker'
43-
};
40+
% set false value for a series of field if they have not been specified
41+
fields2CheckFalse = { ...
42+
'eyeTracker'
43+
};
4444

45-
for iField = 1:numel(fields2CheckFalse)
46-
if ~isfield(cfg, fields2CheckFalse{iField})
47-
cfg = setfield(cfg, fields2CheckFalse{iField}, false); %#ok<SFLD>
45+
for iField = 1:numel(fields2CheckFalse)
46+
if ~isfield(cfg, fields2CheckFalse{iField})
47+
cfg = setfield(cfg, fields2CheckFalse{iField}, false); %#ok<SFLD>
48+
end
4849
end
49-
end
50-
51-
% other defaults
52-
if ~isfield(expParameters, 'askGrpSess')
53-
expParameters.askGrpSess = [true true];
54-
end
5550

51+
% other defaults
52+
if ~isfield(expParameters, 'askGrpSess')
53+
expParameters.askGrpSess = [true true];
54+
end
5655

5756
end

0 commit comments

Comments
 (0)