-
Notifications
You must be signed in to change notification settings - Fork 14
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] small fixes in createDefaultStatsModel.m, getAcquisitionTime.m …
…& bidsResults.m (#1248) * changed condition to check compatibility of sliceOrder and acquisitionTime * fixed conditional statement defining bm.Nodes.GroupBy * Update function bidsResultsSubject: identification of run level contrasts * fixed spelling * update citation.cff * update citation.cff * add test getAcquisitionTime * adapt test data for bids stats model * extract regex * add tests * revert --------- Co-authored-by: Remi Gau <remi_gau@hotmail.com>
- Loading branch information
Showing
9 changed files
with
106 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
function value = endsWithRunNumber(contrastName) | ||
% | ||
% USAGE:: | ||
% | ||
% endsWithRunNumber(contrastName) | ||
% | ||
% | ||
% Returns true if the contrast name ends with an underscore | ||
% followed by some number. | ||
% | ||
|
||
% (C) Copyright 2024 bidspm developers | ||
result = regexp(contrastName, '_[0-9]+\${0,1}$', 'match'); | ||
value = ~isempty(result); | ||
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
function test_suite = test_endsWithRunNumber %#ok<*STOUT> | ||
% (C) Copyright 2022 bidspm developers | ||
try % assignment of 'localfunctions' is necessary in Matlab >= 2016 | ||
test_functions = localfunctions(); %#ok<*NASGU> | ||
catch % no problem; early Matlab versions can use initTestSuite fine | ||
end | ||
initTestSuite; | ||
end | ||
|
||
function test_endsWithRunNumber_basic() | ||
|
||
assertEqual(endsWithRunNumber('foo_1'), true); | ||
assertEqual(endsWithRunNumber('foo_1_'), false); | ||
assertEqual(endsWithRunNumber('foo_1_a'), false); | ||
assertEqual(endsWithRunNumber('foo_'), false); | ||
assertEqual(endsWithRunNumber('foo'), false); | ||
assertEqual(endsWithRunNumber('foo1'), false); | ||
|
||
end |