Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
FSL
fslpy
Commits
19c271c5
Commit
19c271c5
authored
Jun 28, 2022
by
Paul McCarthy
🚵
Browse files
Merge branch 'fix-eddy-cuda' into 'master'
ENH: Optionally set cuda version of eddy_cuda See merge request fsl/fslpy!348
parents
6591fca6
7ec270a9
Pipeline
#14832
failed with stages
in 19 minutes and 26 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
fsl/wrappers/eddy.py
View file @
19c271c5
...
...
@@ -5,6 +5,7 @@
# Author: Sean Fitzgibbon <sean.fitzgibbon@ndcn.ox.ac.uk>
# Author: Paul McCarthy <pauldmccarthy@gmail.com>
# Author: Martin Craig <martin.craig@eng.ox.a.uk>
# Author: Michiel Cottaar <michiel.cottaar@ndcn.ox.ac.uk>
#
"""This module provides wrapper functions for the FSL `TOPUP
<https://fsl.fmrib.ox.ac.uk/fsl/fslwiki/topup>`_ and `EDDY
...
...
@@ -21,14 +22,15 @@ estimation and eddy-current distortion correction.
import
fsl.utils.assertions
as
asrt
from
fsl.utils.deprecated
import
deprecated
from
.
import
wrapperutils
as
wutils
@
wutils
.
fileOrImage
(
'imain'
,
'mask'
,
'field'
)
@
wutils
.
fileOrArray
(
'index'
,
'acqp'
,
'bvecs'
,
'bvals'
,
'field_mat'
)
@
wutils
.
fslwrapper
def
eddy
_cuda
(
imain
,
mask
,
index
,
acqp
,
bvecs
,
bvals
,
out
,
**
kwargs
):
"""Wrapper for the ``eddy
_cuda
`` command."""
def
eddy
(
imain
,
mask
,
index
,
acqp
,
bvecs
,
bvals
,
out
,
**
kwargs
):
"""Wrapper for the ``eddy`` command."""
valmap
=
{
'fep'
:
wutils
.
SHOW_IF_TRUE
,
...
...
@@ -59,10 +61,15 @@ def eddy_cuda(imain, mask, index, acqp, bvecs, bvals, out, **kwargs):
'bvals'
:
bvals
,
'out'
:
out
})
cmd
=
[
'eddy
_cuda
'
]
+
wutils
.
applyArgStyle
(
'--='
,
valmap
=
valmap
,
**
kwargs
)
cmd
=
[
'eddy'
]
+
wutils
.
applyArgStyle
(
'--='
,
valmap
=
valmap
,
**
kwargs
)
return
cmd
@
deprecated
(
"3.10"
,
"4.0"
,
"eddy_cuda has been deprecated in favour of eddy, which will call the appropriate GPU or CPU version of eddy automatically."
)
def
eddy_cuda
(
*
args
,
**
kwargs
):
eddy
(
*
args
,
**
kwargs
)
@
wutils
.
fileOrImage
(
'imain'
,
'fout'
,
'iout'
,
outprefix
=
'out'
)
@
wutils
.
fileOrArray
(
'datain'
,
outprefix
=
'out'
)
@
wutils
.
fslwrapper
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment