From 60ca36b21b47fdf6f7a50cb6d990987072ecc0b2 Mon Sep 17 00:00:00 2001
From: Paul McCarthy <pauldmccarthy@gmail.com>
Date: Fri, 13 Mar 2020 15:18:48 +0000
Subject: [PATCH] ENH: new prelude wrapper

---
 fsl/wrappers/__init__.py |  1 +
 fsl/wrappers/fugue.py    | 21 +++++++++++++++++++++
 2 files changed, 22 insertions(+)

diff --git a/fsl/wrappers/__init__.py b/fsl/wrappers/__init__.py
index 453313f2c..23f45281a 100644
--- a/fsl/wrappers/__init__.py
+++ b/fsl/wrappers/__init__.py
@@ -95,6 +95,7 @@ from .fnirt        import (fnirt,           # noqa
                            convertwarp)
 from .fslmaths     import (fslmaths,)       # noqa
 from .fugue        import (fugue,           # noqa
+                           prelude,
                            sigloss)
 from .melodic      import (melodic,         # noqa
                            fsl_regfilt)
diff --git a/fsl/wrappers/fugue.py b/fsl/wrappers/fugue.py
index ced52f226..8b61f030c 100644
--- a/fsl/wrappers/fugue.py
+++ b/fsl/wrappers/fugue.py
@@ -62,3 +62,24 @@ def sigloss(input, sigloss, **kwargs):
     cmd += wutils.applyArgStyle('--', valmap=valmap, **kwargs)
 
     return cmd
+
+
+@wutils.fileOrImage('complex', 'abs', 'phase', 'mask',
+                    'out', 'unwrap', 'savemask', 'rawphase', 'labels')
+@wutils.fslwrapper
+def prelude(**kwargs):
+    """Wrapper for the ``sigloss`` command."""
+
+    valmap = {
+        'labelslices' : wutils.SHOW_IF_TRUE,
+        'slices'      : wutils.SHOW_IF_TRUE,
+        'force3D'     : wutils.SHOW_IF_TRUE,
+        'removeramps' : wutils.SHOW_IF_TRUE,
+        'verbose'     : wutils.SHOW_IF_TRUE,
+    }
+
+    cmd = ['prelude'] + wutils.applyArgStyle('--=',
+                                             valmap=valmap,
+                                             **kwargs)
+
+    return cmd
-- 
GitLab