-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
reorganize tests and make list of target files to parse for meeg more…
… general
- Loading branch information
Showing
8 changed files
with
154 additions
and
24 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
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,64 @@ | ||
function test_suite = test_bids_query_eeg %#ok<*STOUT> | ||
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_bids_query_eeg_basic() | ||
% | ||
% eeg queries | ||
% | ||
|
||
pth_bids_example = get_test_data_dir(); | ||
|
||
%% | ||
BIDS = bids.layout(fullfile(pth_bids_example, 'eeg_cbm')); | ||
|
||
modalities = {'eeg'}; | ||
assertEqual(bids.query(BIDS, 'modalities'), modalities); | ||
|
||
types = {'channels', 'eeg', 'events'}; | ||
assertEqual(bids.query(BIDS, 'types'), types); | ||
|
||
%% | ||
BIDS = bids.layout(fullfile(pth_bids_example, 'eeg_ds000117')); | ||
|
||
modalities = {'anat', 'eeg'}; | ||
assertEqual(bids.query(BIDS, 'modalities'), modalities); | ||
|
||
types = {'T1w', 'eeg', 'electrodes', 'events'}; | ||
% Missing: 'coordsystem', 'channels' | ||
assertEqual(bids.query(BIDS, 'types'), types); | ||
|
||
%% | ||
BIDS = bids.layout(fullfile(pth_bids_example, 'eeg_face13')); | ||
|
||
modalities = {'eeg'}; | ||
assertEqual(bids.query(BIDS, 'modalities'), modalities); | ||
|
||
types = {'channels', 'eeg', 'events'}; | ||
% Missing: 'electrodes' | ||
% skipped as it contains a task entity and thus does not match the schema | ||
assertEqual(bids.query(BIDS, 'types'), types); | ||
|
||
%% | ||
BIDS = bids.layout(fullfile(pth_bids_example, 'eeg_matchingpennies')); | ||
|
||
modalities = {'eeg'}; | ||
assertEqual(bids.query(BIDS, 'modalities'), modalities); | ||
|
||
types = {'channels', 'eeg', 'events'}; | ||
assertEqual(bids.query(BIDS, 'types'), types); | ||
|
||
%% | ||
BIDS = bids.layout(fullfile(pth_bids_example, 'eeg_rishikesh')); | ||
|
||
modalities = {'eeg'}; | ||
assertEqual(bids.query(BIDS, 'modalities'), modalities); | ||
|
||
types = {'channels', 'eeg', 'events'}; | ||
assertEqual(bids.query(BIDS, 'types'), types); | ||
|
||
end |
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,36 @@ | ||
function test_suite = test_bids_query_ieeg %#ok<*STOUT> | ||
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_bids_query_ieeg_basic() | ||
% | ||
% eeg queries | ||
% | ||
|
||
pth_bids_example = get_test_data_dir(); | ||
|
||
%% | ||
BIDS = bids.layout(fullfile(pth_bids_example, 'ieeg_epilepsy')); | ||
|
||
modalities = {'anat', 'ieeg'}; | ||
assertEqual(bids.query(BIDS, 'modalities'), modalities); | ||
|
||
types = {'T1w', 'channels', 'electrodes', 'events', 'ieeg'}; | ||
% Missing: 'coordsystem' | ||
assertEqual(bids.query(BIDS, 'types'), types); | ||
|
||
%% | ||
BIDS = bids.layout(fullfile(pth_bids_example, 'ieeg_epilepsy_ecog')); | ||
|
||
modalities = {'anat', 'ieeg'}; | ||
assertEqual(bids.query(BIDS, 'modalities'), modalities); | ||
|
||
types = {'T1w', 'channels', 'electrodes', 'events', 'ieeg', 'photo'}; | ||
% Missing: 'coordsystem' | ||
assertEqual(bids.query(BIDS, 'types'), types); | ||
|
||
end |
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,28 @@ | ||
function test_suite = test_bids_query_meg %#ok<*STOUT> | ||
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_bids_query_meg_basic() | ||
% | ||
% meg queries | ||
% | ||
|
||
pth_bids_example = get_test_data_dir(); | ||
|
||
BIDS = bids.layout(fullfile(pth_bids_example, 'ds000246')); | ||
|
||
modalities = {'anat', 'meg'}; | ||
assertEqual(bids.query(BIDS, 'modalities'), modalities); | ||
|
||
types = {'T1w', 'channels', 'photo'}; | ||
% missing: 'meg' 'coordsystem', 'headshape' | ||
assertEqual(bids.query(BIDS, 'types'), types); | ||
|
||
BIDS = bids.layout(fullfile(pth_bids_example, 'ds000247')); | ||
BIDS = bids.layout(fullfile(pth_bids_example, 'ds000248')); | ||
|
||
end |
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