Skip to content

Commit 637d36e

Browse files
committed
fix visMotion demo
1 parent 231c164 commit 637d36e

File tree

3 files changed

+52
-29
lines changed

3 files changed

+52
-29
lines changed

demos/vismotion/batch.m

Lines changed: 32 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -7,35 +7,49 @@
77
WD = fileparts(mfilename('fullpath'));
88

99
% we add all the subfunctions that are in the sub directories
10-
addpath(fullfile(WD, '..'));
11-
addpath(genpath(fullfile(WD, '..', 'src')));
12-
addpath(genpath(fullfile(WD, '..', 'lib')));
10+
addpath(genpath(fullfile(WD, '..', '..', 'src')));
11+
addpath(genpath(fullfile(WD, '..', '..', 'lib')));
1312

1413
%% Run batches
1514
opt = getOption();
1615

1716
checkDependencies();
1817

19-
% copy raw folder into derivatives folder
20-
% BIDS_copyRawFolder(opt, 1)
18+
reportBIDS(opt);
2119

22-
% preprocessing
23-
% BIDS_STC(opt);
24-
% BIDS_SpatialPrepro(opt);
25-
% BIDS_Smoothing(6, opt);
20+
bidsCopyRawFolder(opt, 1);
21+
%
22+
% % preprocessing
23+
bidsSTC(opt);
24+
bidsSpatialPrepro(opt);
25+
26+
% Quality control
27+
anatomicalQA(opt);
28+
29+
% Not implemented yet
30+
% bidsResliceTpmToFunc(opt);
31+
% functionalQA(opt);
32+
33+
funcFWHM = 6;
34+
bidsSmoothing(funcFWHM, opt);
2635

2736
% subject level Univariate
28-
% BIDS_FFX(1, 6, opt);
29-
% BIDS_FFX(2, 6, opt);
37+
bidsFFX('specifyAndEstimate', opt, funcFWHM);
38+
bidsFFX('contrasts', opt, funcFWHM);
3039

3140
% group level univariate
32-
BIDS_RFX(1, 6, 6);
33-
BIDS_RFX(2, 6, 6);
41+
conFWHM = 6;
42+
bidsRFX('smoothContrasts', funcFWHM, conFWHM, opt);
3443

35-
BIDS_Results(6, 6, opt, 0);
44+
% Not implemented yet
45+
% bidsRFX('RFX', funcFWHM, conFWHM, opt);
3646

47+
% Not implemented yet
3748
% subject level multivariate
38-
% isMVPA=1;
39-
% BIDS_FFX(1, 6, opt, isMVPA);
40-
% BIDS_FFX(2, 6, opt, isMVPA);
41-
% make4Dmaps(6,opt)
49+
% opt.model.file = fuufile(WD, ...
50+
% 'models', ...
51+
% 'model-motionDecodingMultivariate_smdl.json');
52+
%
53+
% bidsFFX('specifyAndEstimate', opt, funcFWHM);
54+
% bidsFFX('contrasts', opt, funcFWHM);
55+
% concatBetaImgTmaps(funcFWHM, opt);

demos/vismotion/getOption.m

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,12 @@
1313
opt.taskName = 'visMotion';
1414

1515
% The directory where the data are located
16-
opt.dataDir = '/home/remi/BIDS/visMotion/derivatives/';
16+
opt.dataDir = '/home/remi/gin/CPP_visMotion/raw';
17+
opt.derivativesDir = '/home/remi/Documents';
1718

1819
% specify the model file that contains the contrasts to compute
1920
opt.model.file = ...
20-
'/home/remi/github/CPP_BIDS_SPM_pipeline/model-visMotionLoc_smdl.json';
21+
'/home/remi/github/CPP_BIDS_SPM_pipeline/demos/vismotion/models/model-visMotionLoc_smdl.json';
2122

2223
% specify the result to compute
2324
% Contrasts.Name has to match one of the contrast defined in the model json file

demos/vismotion/models/model-visMotionLoc_smdl.json

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -5,18 +5,22 @@
55
"task": "visMotion"
66
},
77
"Steps": [
8+
{
9+
"Level": "run",
10+
"Model": {
11+
"X": [
12+
"trial_type.VisMot",
13+
"trial_type.VisStat",
14+
"trans_x", "trans_y", "trans_z", "rot_x", "rot_y", "rot_z"
15+
]
16+
}
17+
},
818
{
919
"Level": "subject",
1020
"Model": {
1121
"X": [
12-
"trial_type.Vis_U",
13-
"trial_type.Vis_D",
14-
"trial_type.Vis_R",
15-
"trial_type.Vis_L",
16-
"trial_type.Aud_U",
17-
"trial_type.Aud_D",
18-
"trial_type.Aud_L",
19-
"trial_type.Aud_R",
22+
"trial_type.VisMot",
23+
"trial_type.VisStat",
2024
"trans_x", "trans_y", "trans_z", "rot_x", "rot_y", "rot_z"
2125
]
2226
},
@@ -42,7 +46,11 @@
4246
},
4347
{
4448
"Level": "dataset",
45-
"AutoContrasts": ["trial_type.VisMot", "trial_type.VisStat", "VisMot_gt_VisStat", "VisStat_gt_VisMot"]
49+
"AutoContrasts": [
50+
"trial_type.VisMot",
51+
"trial_type.VisStat",
52+
"VisMot_gt_VisStat",
53+
"VisStat_gt_VisMot"]
4654
}
4755
]
4856
}

0 commit comments

Comments
 (0)