Skip to content

Commit e49f33f

Browse files
authored
Merge pull request #294 from CerenB/cer-bidsConcat-hotfix
bidsConcatBetaTmaps hoxfit for ffxDir definition in subfun
2 parents 64a599a + 21b8f71 commit e49f33f

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/workflows/bidsConcatBetaTmaps.m

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,23 +65,21 @@ function bidsConcatBetaTmaps(opt, funcFWHM, deleteIndBeta, deleteIndTmaps)
6565

6666
saveAndRunWorkflow(matlabbatch, 'concat_betaImg_tMaps', opt, subID);
6767

68-
removeBetaImgTmaps(beta_maps, t_maps, deleteIndBeta, deleteIndTmaps);
68+
removeBetaImgTmaps(t_maps, deleteIndBeta, deleteIndTmaps, ffxDir);
6969

7070
end
7171
end
7272

7373
end
7474

75-
function removeBetaImgTmaps(beta_maps, t_maps, deleteIndBeta, deleteIndTmaps)
75+
function removeBetaImgTmaps(t_maps, deleteIndBeta, deleteIndTmaps, ffxDir)
7676

7777
% delete maps
7878
if deleteIndBeta
7979

8080
% delete all individual beta maps
8181
fprintf('Deleting individual beta-maps ... ');
82-
for iBeta = 1:length(beta_maps)
83-
delete(beta_maps{iBeta}(1:end - 2));
84-
end
82+
delete(fullfile(ffxDir, ['beta_*', '.nii']));
8583
fprintf('Done. \n\n\n ');
8684

8785
end
@@ -103,7 +101,4 @@ function removeBetaImgTmaps(beta_maps, t_maps, deleteIndBeta, deleteIndTmaps)
103101
fprintf('Done. \n\n\n ');
104102
end
105103

106-
% delete mat files
107-
delete(fullfile(ffxDir, ['4D_*', num2str(funcFWHM), '.mat']));
108-
109104
end

0 commit comments

Comments
 (0)