From 0182c2b21c464377cb3f3a4c678d00253df2e5cf Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Tue, 14 Apr 2020 15:51:01 +0100
Subject: [PATCH] MNT: More explicit documentation for concatxfm

---
 fsl/wrappers/flirt.py | 21 ++++++++++++++-------
 1 file changed, 14 insertions(+), 7 deletions(-)

diff --git a/fsl/wrappers/flirt.py b/fsl/wrappers/flirt.py
index df7eb2722..eaee2d0ac 100644
--- a/fsl/wrappers/flirt.py
+++ b/fsl/wrappers/flirt.py
@@ -98,19 +98,26 @@ def invxfm(inmat, omat):
     return ['convert_xfm', '-omat', omat, '-inverse', inmat]
 
 
-@wutils.fileOrArray('inmat1', 'inmat2', 'outmat')
+@wutils.fileOrArray('atob', 'atoc', 'btoc')
 @wutils.fslwrapper
-def concatxfm(inmat1, inmat2, outmat):
-    """Use ``convert_xfm`` to concatenate two affines."""
+def concatxfm(atob, btoc, atoc):
+    """Use ``convert_xfm`` to concatenate two affines. Note that the
+    order of the input matrices is the opposite of the order expected
+    by ``convert_xfm``.
+
+    :arg atob: Input matrix, transforming from "A" to "B".
+    :arg btoc: Input matrix, transforming from "B" to "C".
+    :arg atoc: Output matrix, transforming from "A" to "C".
+    """
 
-    asrt.assertFileExists(inmat1, inmat2)
+    asrt.assertFileExists(atob, btoc)
 
     cmd = ['convert_xfm',
            '-omat',
-           outmat,
+           atoc,
            '-concat',
-           inmat2,
-           inmat1]
+           btoc,
+           atob]
 
     return cmd
 
-- 
GitLab