Skip to content

Commit

Permalink
fix minor bug
Browse files Browse the repository at this point in the history
minor fix to single if statement
  • Loading branch information
fishpm authored Jan 17, 2024
1 parent 252855b commit 11fc70c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion bids/spmup_BIDS_preprocess.m
Original file line number Diff line number Diff line change
Expand Up @@ -606,7 +606,7 @@
strcmp(subject.fieldmap(ifmap).type, 'phasediff') && isempty(subject.fieldmap(ifmap).mag1)
clear matlabbatch
t1index = find(cellfun(@(x) contains(x,'T1w'),subject.anat));
if length(t1index>1)
if length(t1index)>1
t1index = t1index(ifmap); % this should match session order as spm_BIDS
end
matlabbatch{1}.spm.spatial.coreg.write.ref = {subject.fieldmap(ifmap).phasediff};
Expand Down

0 comments on commit 11fc70c

Please sign in to comment.