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
a81c4b89
Commit
a81c4b89
authored
Apr 01, 2019
by
Paul McCarthy
🚵
Browse files
Merge branch 'rel/2.0.1' into 'v2.0'
Rel/2.0.1 See merge request fsl/fslpy!112
parents
160e2226
4c6d8ff2
Pipeline
#3527
passed with stages
in 1 minute and 19 seconds
Changes
8
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
CHANGELOG.rst
View file @
a81c4b89
...
...
@@ -2,6 +2,18 @@ This document contains the ``fslpy`` release history in reverse chronological
order.
2.0.1 (Monday April 1st 2019)
-----------------------------
Fixed
^^^^^
* Fixed a bug with the :func:`.gifti.relatedFiles` function returning
duplicate files.
2.0.0 (Friday March 20th 2019)
------------------------------
...
...
doc/fsl.utils.tempdir.rst
View file @
a81c4b89
``fsl.utils.temdir``
====================
``fsl.utils.tem
p
dir``
====================
=
.. automodule:: fsl.utils.tempdir
:members:
...
...
doc/fsl.wrappers.fsl_anat.rst
0 → 100644
View file @
a81c4b89
``fsl.wrappers.fsl_anat``
=========================
.. automodule:: fsl.wrappers.fsl_anat
:members:
:undoc-members:
:show-inheritance:
doc/fsl.wrappers.rst
View file @
a81c4b89
...
...
@@ -10,6 +10,7 @@
fsl.wrappers.flirt
fsl.wrappers.fnirt
fsl.wrappers.fslmaths
fsl.wrappers.fsl_anat
fsl.wrappers.fugue
fsl.wrappers.melodic
fsl.wrappers.misc
...
...
fsl/data/gifti.py
View file @
a81c4b89
...
...
@@ -333,7 +333,7 @@ def relatedFiles(fname, ftypes=None):
related
=
[]
for
ftype
in
ftypes
:
related
.
extend
(
glob
.
glob
(
op
.
join
(
dirname
,
'{}*{}'
.
format
(
prefix
,
ftype
)))
)
hits
=
glob
.
glob
(
op
.
join
(
dirname
,
'{}*{}'
.
format
(
prefix
,
ftype
)))
related
.
extend
([
h
for
h
in
hits
if
h
not
in
related
]
)
return
[
r
for
r
in
related
if
r
!=
path
]
fsl/version.py
View file @
a81c4b89
...
...
@@ -47,7 +47,7 @@ import re
import
string
__version__
=
'2.0.
0
'
__version__
=
'2.0.
1
'
"""Current version number, as a string. """
...
...
fsl/wrappers/wrapperutils.py
View file @
a81c4b89
...
...
@@ -10,7 +10,7 @@
functions.
The :func:`cmdwrapper` and :func:`fslwrapper` functions are conenience
The :func:`cmdwrapper` and :func:`fslwrapper` functions are con
v
enience
decorators which allow you to write your wrapper function such that it simply
generates the command-line needed to respectively run a standard shell
command or a FSL command. For example::
...
...
@@ -39,7 +39,7 @@ patterns. For example::
The :func:`fileOrImage` and :func:`fileOrArray` functions can be used to
decorate a wrapper function such that in-memory ``nibabel`` images or Numpy
arrays can be passed in as arguments - they will be automatically saved out to
files, and then the file names passed into the wrapper function. For ex
m
aple::
files, and then the file names passed into the wrapper function. For exa
m
ple::
@fileOrImage('src', 'ref')
...
...
@@ -225,18 +225,18 @@ def applyArgStyle(style,
========= ========== ===========================
``style`` ``valsep`` Result
========= ========== ===========================
``'-'`` ' '
``-name val1 val2 val3``
``'-'`` '"'
``-name "val1 val2 val3"``
``'-'`` ','
``-name val1,val2,val3``
``'--'`` ' '
``--name val1 val2 val3``
``'--'`` '"'
``--name "val1 val2 val3"``
``'--'`` ','
``--name val1,val2,val3``
``'-='`` ' '
Not supported
``'-='`` '"'
``-name="val1 val2 val3"``
``'-='`` ','
``-name=val1,val2,val3``
``'--='`` ' '
Not supported
``'--='`` '"'
``--name="val1 val2 val3"``
``'--='`` ','
``--name=val1,val2,val3``
``'-'``
``
' '
``
``-name val1 val2 val3``
``'-'``
``
'"'
``
``-name "val1 val2 val3"``
``'-'``
``
','
``
``-name val1,val2,val3``
``'--'``
``
' '
``
``--name val1 val2 val3``
``'--'``
``
'"'
``
``--name "val1 val2 val3"``
``'--'``
``
','
``
``--name val1,val2,val3``
``'-='``
``
' '
``
Not supported
``'-='``
``
'"'
``
``-name="val1 val2 val3"``
``'-='``
``
','
``
``-name=val1,val2,val3``
``'--='``
``
' '
``
Not supported
``'--='``
``
'"'
``
``--name="val1 val2 val3"``
``'--='``
``
','
``
``--name=val1,val2,val3``
========= ========== ===========================
...
...
tests/test_gifti.py
View file @
a81c4b89
...
...
@@ -224,6 +224,7 @@ def test_relatedFiles():
assert
len
(
gifti
.
relatedFiles
(
badname
))
==
0
assert
len
(
gifti
.
relatedFiles
(
'nonexistent'
))
==
0
llisting
=
[
op
.
join
(
td
,
f
)
for
f
in
listing
]
lsurfaces
=
[
op
.
join
(
td
,
f
)
for
f
in
lsurfaces
]
rsurfaces
=
[
op
.
join
(
td
,
f
)
for
f
in
rsurfaces
]
lrelated
=
[
op
.
join
(
td
,
f
)
for
f
in
lrelated
]
...
...
@@ -236,6 +237,12 @@ def test_relatedFiles():
result
=
gifti
.
relatedFiles
(
s
)
assert
sorted
(
rrelated
)
==
sorted
(
result
)
exp
=
lsurfaces
+
lrelated
exp
=
[
f
for
f
in
exp
if
f
!=
lsurfaces
[
0
]]
result
=
gifti
.
relatedFiles
(
lsurfaces
[
0
],
ftypes
=
gifti
.
ALLOWED_EXTENSIONS
)
assert
sorted
(
exp
)
==
sorted
(
result
)
TEST_VERTS
=
np
.
array
([
[
0
,
0
,
0
],
[
1
,
0
,
0
],
...
...
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