Skip to content

Commit

Permalink
move space to each action cli
Browse files Browse the repository at this point in the history
  • Loading branch information
Remi-Gau committed Aug 10, 2023
1 parent 9bad6bc commit 5a55992
Show file tree
Hide file tree
Showing 11 changed files with 141 additions and 92 deletions.
1 change: 0 additions & 1 deletion bidspm.m
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
parse(args, varargin{:});
catch ME
disp('arguments passed were :');
varargin{i};
for i = 1:numel(varargin)
fprintf(1, '- ');
fprintf(varargin{i});
Expand Down
5 changes: 5 additions & 0 deletions demos/MoAE/test_moae.m
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,11 @@
output_dir = fullfile(tempname, 'outputs', 'derivatives');
spm_mkdir(output_dir);

disp(bids_dir);
disp(output_dir);
disp(ignore{iOption});
disp(space(iOption));
disp(optionsFile);
bidspm(bids_dir, output_dir, 'subject', ...
'participant_label', {'01'}, ...
'action', 'preprocess', ...
Expand Down
1 change: 0 additions & 1 deletion src/cli/baseInputParser.m
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
addParameter(args, 'action', defaultAction, isChar);

addParameter(args, 'participant_label', {}, isCellStr);
addParameter(args, 'space', {}, isCellStr);
addParameter(args, 'bids_filter_file', struct([]), isFileOrStruct);

addParameter(args, 'verbosity', 2, isPositiveScalar);
Expand Down
2 changes: 2 additions & 0 deletions src/cli/inputParserForCopy.m
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,14 @@
% (C) Copyright 2023 bidspm developers
isLogical = @(x) islogical(x) && numel(x) == 1;
isCharOrCellstr = @(x) ischar(x) || iscellstr(x); %#ok<*ISCLSTR>
isCellStr = @(x) iscellstr(x);

args = baseInputParser();

% allow unmatched in case this is called from cliSmooth
args.KeepUnmatched = true;

addParameter(args, 'space', {}, isCellStr);
addParameter(args, 'task', {}, isCharOrCellstr);
addParameter(args, 'force', false, isLogical);
addParameter(args, 'anat_only', false, isLogical);
Expand Down
1 change: 1 addition & 0 deletions src/cli/inputParserForCreateModel.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@

isEmptyOrCellstr = @(x) isempty(x) || iscellstr(x); %#ok<*ISCLSTR>

addParameter(args, 'space', {}, isCellStr);
addParameter(args, 'task', {}, isEmptyOrCellstr);

% :param ignore: Optional. Cell string that can contain:
Expand Down
1 change: 1 addition & 0 deletions src/cli/inputParserForCreateRoi.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
isCellStr = @(x) iscellstr(x);
isLogical = @(x) islogical(x) && numel(x) == 1;

addParameter(args, 'space', {}, isCellStr);
addParameter(args, 'roi_dir', '', isDir);
addParameter(args, 'preproc_dir', '', isDir);
addParameter(args, 'hemisphere', {'L', 'R'}, isCellStr);
Expand Down
2 changes: 2 additions & 0 deletions src/cli/inputParserForPreprocess.m
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@
isLogical = @(x) islogical(x) && numel(x) == 1;
isEmptyOrCellstr = @(x) isempty(x) || iscellstr(x); %#ok<*ISCLSTR>
isEmptyOrisChar = @(x) isempty(x) || ischar(x); %#ok<*ISCLSTR>
isCellStr = @(x) iscellstr(x);

addParameter(args, 'space', {}, isCellStr);
addParameter(args, 'task', '', isEmptyOrisChar);
addParameter(args, 'fwhm', 6, isPositiveScalar);
addParameter(args, 'dry_run', false, isLogical);
Expand Down
2 changes: 2 additions & 0 deletions src/cli/inputParserForSmooth.m
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,9 @@

isPositiveScalar = @(x) isnumeric(x) && numel(x) == 1 && x >= 0;
isLogical = @(x) islogical(x) && numel(x) == 1;
isCellStr = @(x) iscellstr(x);

addParameter(args, 'space', {}, isCellStr);
addParameter(args, 'fwhm', 6, isPositiveScalar);
addParameter(args, 'dry_run', false, isLogical);
end
1 change: 1 addition & 0 deletions src/cli/inputParserForStats.m
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
isCellStr = @(x) iscellstr(x);
isEmptyOrCellstr = @(x) isempty(x) || iscellstr(x); %#ok<*ISCLSTR>

addParameter(args, 'space', {}, isCellStr);
addParameter(args, 'task', {}, isCellStr);
addParameter(args, 'preproc_dir', pwd, isFolder);
addParameter(args, 'model_file', struct([]), isFileOrStructOrIsDir);
Expand Down
Loading

0 comments on commit 5a55992

Please sign in to comment.