Skip to content

Commit f53979a

Browse files
authored
[MAINT] update bids matlab (#1140)
* [DATALAD] Recorded changes * rm extra if block * adapt models * fix tests
1 parent 11ecc2c commit f53979a

File tree

11 files changed

+72
-61
lines changed

11 files changed

+72
-61
lines changed

.circleci/config.yml

Lines changed: 15 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -157,22 +157,26 @@ jobs:
157157
name: push to dockerhub
158158
command: |
159159
set -ex -o pipefail
160+
160161
if [[ -n "${DOCKER_TOKEN}" ]]; then
162+
161163
# make sure we have a lowercase repo
162164
user_name=cpplab
163165
repo_name=$(echo "${CIRCLE_PROJECT_REPONAME}" | tr '[:upper:]' '[:lower:]')
164-
if [[ -n "${DOCKER_TOKEN}" ]]; then
165-
echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_USER}" --password-stdin
166-
: "Pushing to DockerHub ${user_name}/${repo_name}:unstable"
167-
docker tag "${user_name}/${repo_name}" "${user_name}/${repo_name}:unstable"
168-
docker push "${user_name}/${repo_name}:unstable"
169-
if [[ -n "${CIRCLE_TAG}" ]]; then
170-
: "Pushing to DockerHub ${user_name}/${repo_name}:${CIRCLE_TAG}"
171-
docker push "${user_name}/${repo_name}:latest"
172-
docker tag "${user_name}/${repo_name}" "${user_name}/${repo_name}:${CIRCLE_TAG}"
173-
docker push "${user_name}/${repo_name}:${CIRCLE_TAG}"
174-
fi
166+
167+
echo "${DOCKER_TOKEN}" | docker login -u "${DOCKER_USER}" --password-stdin
168+
169+
: "Pushing to DockerHub ${user_name}/${repo_name}:unstable"
170+
docker tag "${user_name}/${repo_name}" "${user_name}/${repo_name}:unstable"
171+
docker push "${user_name}/${repo_name}:unstable"
172+
173+
if [[ -n "${CIRCLE_TAG}" ]]; then
174+
: "Pushing to DockerHub ${user_name}/${repo_name}:${CIRCLE_TAG}"
175+
docker push "${user_name}/${repo_name}:latest"
176+
docker tag "${user_name}/${repo_name}" "${user_name}/${repo_name}:${CIRCLE_TAG}"
177+
docker push "${user_name}/${repo_name}:${CIRCLE_TAG}"
175178
fi
179+
176180
else
177181
: "No DOCKER_TOKEN, skipping push to DockerHub"
178182
exit 1

demos/face_repetition/download_face_rep_ds.m

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,10 @@ function download_face_rep_ds(download_data)
44

55
% (C) Copyright 2022 Remi Gau
66

7+
if nargin < 1
8+
download_data = true;
9+
end
10+
711
if download_data
812

913
WD = pwd;

demos/face_repetition/face_rep_01_bids_app.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
clear;
2828
clc;
2929

30-
download_data = false;
30+
download_data = true;
3131

3232
addpath(fullfile(pwd, '..', '..'));
3333

demos/face_repetition/models/model-faceRepetitionParametric_smdl.json

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@
3434
},
3535
"Model": {
3636
"X": [
37-
"trial_type.famous_1",
38-
"trial_type.famous_2",
39-
"trial_type.unfamiliar_1",
40-
"trial_type.unfamiliar_2",
37+
"trial_type.famous_first_show",
38+
"trial_type.famous_delayed_repeat",
39+
"trial_type.unfamiliar_first_show",
40+
"trial_type.unfamiliar_delayed_repeat",
4141
"trans_?",
4242
"rot_?"
4343
],
4444
"HRF": {
4545
"Variables": [
46-
"trial_type.famous_1",
47-
"trial_type.famous_2",
48-
"trial_type.unfamiliar_1",
49-
"trial_type.unfamiliar_2"
46+
"trial_type.famous_first_show",
47+
"trial_type.famous_delayed_repeat",
48+
"trial_type.unfamiliar_first_show",
49+
"trial_type.unfamiliar_delayed_repeat"
5050
],
5151
"Model": "spm"
5252
},
@@ -69,8 +69,8 @@
6969
{
7070
"Name": "lag mod",
7171
"Conditions": [
72-
"trial_type.famous_2",
73-
"trial_type.unfamiliar_2"
72+
"trial_type.famous_delayed_repeat",
73+
"trial_type.unfamiliar_delayed_repeat"
7474
],
7575
"Values": [
7676
"lag"
@@ -84,20 +84,20 @@
8484
"DummyContrasts": {
8585
"Test": "t",
8686
"Contrasts": [
87-
"trial_type.famous_1",
88-
"trial_type.famous_2",
89-
"trial_type.unfamiliar_1",
90-
"trial_type.unfamiliar_2"
87+
"trial_type.famous_first_show",
88+
"trial_type.famous_delayed_repeat",
89+
"trial_type.unfamiliar_first_show",
90+
"trial_type.unfamiliar_delayed_repeat"
9191
]
9292
},
9393
"Contrasts": [
9494
{
9595
"Name": "faces_gt_baseline",
9696
"ConditionList": [
97-
"trial_type.famous_1",
98-
"trial_type.famous_2",
99-
"trial_type.unfamiliar_1",
100-
"trial_type.unfamiliar_2"
97+
"trial_type.famous_first_show",
98+
"trial_type.famous_delayed_repeat",
99+
"trial_type.unfamiliar_first_show",
100+
"trial_type.unfamiliar_delayed_repeat"
101101
],
102102
"Weights": [
103103
1,
@@ -110,10 +110,10 @@
110110
{
111111
"Name": "faces_lt_baseline",
112112
"ConditionList": [
113-
"trial_type.famous_1",
114-
"trial_type.famous_2",
115-
"trial_type.unfamiliar_1",
116-
"trial_type.unfamiliar_2"
113+
"trial_type.famous_first_show",
114+
"trial_type.famous_delayed_repeat",
115+
"trial_type.unfamiliar_first_show",
116+
"trial_type.unfamiliar_delayed_repeat"
117117
],
118118
"Weights": [
119119
-1,

demos/face_repetition/models/model-faceRepetition_smdl.json

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -34,19 +34,19 @@
3434
},
3535
"Model": {
3636
"X": [
37-
"trial_type.famous_1",
38-
"trial_type.famous_2",
39-
"trial_type.unfamiliar_1",
40-
"trial_type.unfamiliar_2",
37+
"trial_type.famous_first_show",
38+
"trial_type.famous_delayed_repeat",
39+
"trial_type.unfamiliar_first_show",
40+
"trial_type.unfamiliar_delayed_repeat",
4141
"trans_?",
4242
"rot_?"
4343
],
4444
"HRF": {
4545
"Variables": [
46-
"trial_type.famous_1",
47-
"trial_type.famous_2",
48-
"trial_type.unfamiliar_1",
49-
"trial_type.unfamiliar_2"
46+
"trial_type.famous_first_show",
47+
"trial_type.famous_delayed_repeat",
48+
"trial_type.unfamiliar_first_show",
49+
"trial_type.unfamiliar_delayed_repeat"
5050
],
5151
"Model": "spm + derivative + dispersion"
5252
},
@@ -111,20 +111,20 @@
111111
"DummyContrasts": {
112112
"Test": "t",
113113
"Contrasts": [
114-
"trial_type.famous_1",
115-
"trial_type.famous_2",
116-
"trial_type.unfamiliar_1",
117-
"trial_type.unfamiliar_2"
114+
"trial_type.famous_first_show",
115+
"trial_type.famous_delayed_repeat",
116+
"trial_type.unfamiliar_first_show",
117+
"trial_type.unfamiliar_delayed_repeat"
118118
]
119119
},
120120
"Contrasts": [
121121
{
122122
"Name": "faces_gt_baseline",
123123
"ConditionList": [
124-
"trial_type.famous_1",
125-
"trial_type.famous_2",
126-
"trial_type.unfamiliar_1",
127-
"trial_type.unfamiliar_2"
124+
"trial_type.famous_first_show",
125+
"trial_type.famous_delayed_repeat",
126+
"trial_type.unfamiliar_first_show",
127+
"trial_type.unfamiliar_delayed_repeat"
128128
],
129129
"Weights": [
130130
1,
@@ -137,10 +137,10 @@
137137
{
138138
"Name": "faces_lt_baseline",
139139
"ConditionList": [
140-
"trial_type.famous_1",
141-
"trial_type.famous_2",
142-
"trial_type.unfamiliar_1",
143-
"trial_type.unfamiliar_2"
140+
"trial_type.famous_first_show",
141+
"trial_type.famous_delayed_repeat",
142+
"trial_type.unfamiliar_first_show",
143+
"trial_type.unfamiliar_delayed_repeat"
144144
],
145145
"Weights": [
146146
-1,

lib/CPP_ROI

lib/spm_2_bids

src/workflows/stats/bidsConcatBetaTmaps.m

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -64,6 +64,9 @@ function bidsConcatBetaTmaps(opt, deleteTmaps)
6464

6565
% path to beta and t-map files.
6666

67+
runs = [];
68+
conditions = {};
69+
6770
msg = 'Concatenating the following contrasts:';
6871
logger('INFO', msg, 'options', opt, 'filename', mfilename());
6972
for iContrast = 1:length(contrasts)

tests/data/mat_files/SPM_facerep.mat

9.92 KB
Binary file not shown.

tests/tests_stats/subject_level/test_getEventSpecificationRoiGlm.m

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,19 +21,19 @@ function test_getEventSpecificationRoiGlm_basic()
2121
% THEN
2222
assertEqual(numel(event_specification), 5);
2323

24-
assertEqual(event_specification(1).name, 'famous_1');
24+
assertEqual(event_specification(1).name, 'famous_first_show');
2525
assertEqual(event_specification(1).eventSpec, [1; 1]);
2626
assertEqual(event_specification(1).duration, 0);
2727

28-
assertEqual(event_specification(2).name, 'famous_2');
28+
assertEqual(event_specification(2).name, 'famous_delayed_repeat');
2929
assertEqual(event_specification(2).eventSpec, [1; 2]);
3030
assertEqual(event_specification(2).duration, 0);
3131

32-
assertEqual(event_specification(3).name, 'unfamiliar_1');
32+
assertEqual(event_specification(3).name, 'unfamiliar_first_show');
3333
assertEqual(event_specification(3).eventSpec, [1; 3]);
3434
assertEqual(event_specification(3).duration, 0);
3535

36-
assertEqual(event_specification(4).name, 'unfamiliar_2');
36+
assertEqual(event_specification(4).name, 'unfamiliar_delayed_repeat');
3737
assertEqual(event_specification(4).eventSpec, [1; 4]);
3838
assertEqual(event_specification(4).duration, 0);
3939

0 commit comments

Comments
 (0)