Skip to content

Commit 22c1e8d

Browse files
committed
fix wrong output for files with "ua*" that should be unwarp
1 parent 608ee60 commit 22c1e8d

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/defaults/Mapping.m

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -175,12 +175,12 @@
175175
{ 'iy_' }, obj.cfg.segment.deformation_field.from_mni; ...
176176
{ 'y_' }, obj.cfg.segment.deformation_field.to_mni; ...
177177
{ 'segparam_' }, obj.cfg.segment.param; ...
178-
{ obj.stc, [obj.unwarp, obj.stc]}, obj.cfg.stc; ...
178+
{ obj.stc}, obj.cfg.stc; ...
179179
{ 'unwarpparam_' }, obj.cfg.realign_unwarp_param; ...
180-
{ obj.unwarp }, obj.cfg.realign_unwarp; ...
180+
{ obj.unwarp, [obj.unwarp, obj.stc] }, obj.cfg.realign_unwarp; ...
181181
{ 'rp_', ['rp_' obj.stc] }, obj.cfg.real_param; ...
182182
{ 'mean', ...
183-
['mean' obj.unwarp], ...
183+
['mean' obj.unwarp], ...
184184
['mean' obj.unwarp, obj.stc] }, obj.cfg.mean; ...
185185
{ obj.norm, ...
186186
[obj.norm, obj.bias_cor], ...

tests/test_spm_2_bids.m

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,8 @@ function test_spm_2_bids_order_entities()
1818

1919
function test_spm_2_bids_suffix()
2020

21-
input_output = {
22-
'sub-01_T1w_seg8.mat', ...
23-
'sub-01_label-T1w_segparam.mat'
24-
'sub-01_task-auditory_bold_uw.mat', ...
25-
'sub-01_task-auditory_label-bold_unwarpparam.mat'};
21+
input_output = {'sub-01_T1w_seg8.mat', 'sub-01_label-T1w_segparam.mat'
22+
'sub-01_task-foo_bold_uw.mat', 'sub-01_task-foo_label-bold_unwarpparam.mat'};
2623

2724
for i = 1:numel(size(input_output, 1))
2825

@@ -230,7 +227,7 @@ function test_spm_2_bids_func()
230227
prefix_and_output = { ...
231228
{'a'}, ...
232229
'sub-01_task-auditory_space-individual_desc-stc_bold.nii'; ...
233-
{'u'}, ...
230+
{'u', 'ua'}, ...
234231
'sub-01_task-auditory_space-individual_desc-realignUnwarp_bold.nii'; ...
235232
{'rp_', 'rp_a'}, ...
236233
'sub-01_task-auditory_motion.tsv'; ...

0 commit comments

Comments
 (0)