Skip to content

Commit 869b2c3

Browse files
committed
Merge pull request #708 from effigies/master
Allow ArtifactDetect to correctly handle AFNI motion correction parameters generated with -dfile or -1Dfile
2 parents f9f3ffd + 473f3df commit 869b2c3

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

nipype/algorithms/rapidart.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,11 +46,8 @@ def _get_affine_matrix(params, source):
4646
"""
4747
if source == 'FSL':
4848
params = params[[3, 4, 5, 0, 1, 2]]
49-
elif source == 'AFNI':
50-
params = params[[4, 5, 3, 1, 2, 0]]
51-
params[3:] = params[3:] * np.pi / 180.
52-
elif source == 'FSFAST':
53-
params = params[[5, 6, 4, 2, 3, 1]]
49+
elif source in ('AFNI', 'FSFAST'):
50+
params = params[np.asarray([4, 5, 3, 1, 2, 0]) + (len(params) > 6)]
5451
params[3:] = params[3:] * np.pi / 180.
5552
if source == 'NIPY':
5653
# nipy does not store typical euler angles, use nipy to convert

0 commit comments

Comments
 (0)