Skip to content

Commit 57b03db

Browse files
committed
Merge branch 'master' of git://github.com/nipy/nipype into enh/selectdirs
2 parents 864dbae + 2f422f0 commit 57b03db

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

58 files changed

+1208
-270
lines changed

.travis.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ env:
1111
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler"
1212
- INSTALL_DEB_DEPENDECIES=false NIPYPE_EXTRAS="doc,tests,fmri,profiler"
1313
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler,duecredit"
14+
- INSTALL_DEB_DEPENDECIES=true NIPYPE_EXTRAS="doc,tests,fmri,profiler" PIP_FLAGS="--pre"
1415
before_install:
1516
- function apt_inst {
1617
if $INSTALL_DEB_DEPENDECIES; then sudo rm -rf /dev/shm; fi &&
@@ -36,12 +37,17 @@ before_install:
3637
conda install python=${TRAVIS_PYTHON_VERSION} &&
3738
conda config --add channels conda-forge &&
3839
conda install -y nipype icu &&
39-
rm -r ${CONDA_HOME}/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype*; }
40+
rm -r ${CONDA_HOME}/lib/python${TRAVIS_PYTHON_VERSION}/site-packages/nipype*;
41+
pushd $HOME;
42+
git clone https://github.com/INCF/pybids.git;
43+
cd pybids;
44+
pip install -e .;
45+
popd; }
4046
# Add install of vtk and mayavi to test mesh (disabled): conda install -y vtk mayavi
4147
- travis_retry apt_inst
4248
- travis_retry conda_inst
4349
install:
44-
- travis_retry pip install -e .[$NIPYPE_EXTRAS]
50+
- travis_retry pip install $PIP_FLAGS -e .[$NIPYPE_EXTRAS]
4551
script:
4652
- py.test -v --doctest-modules nipype
4753
deploy:

.zenodo.json

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -523,6 +523,16 @@
523523
"affiliation": "University of Amsterdam",
524524
"name": "Lukas Snoek",
525525
"orcid": "0000-0001-8972-204X"
526+
},
527+
{
528+
"affiliation": "Vrije Universiteit, Amsterdam",
529+
"name": "Gilles de Hollander",
530+
"orcid": "0000-0003-1988-5091"
531+
},
532+
{
533+
"affiliation": "University of Texas at Austin",
534+
"name": "De La Vega, Alejandro",
535+
"orcid": "0000-0001-9062-3778"
526536
}
527537
],
528538
"keywords": [

Dockerfile

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,9 @@ COPY requirements.txt requirements.txt
8787
RUN pip install -r requirements.txt && \
8888
rm -rf ~/.cache/pip
8989

90+
RUN git clone https://github.com/INCF/pybids.git && \
91+
cd pybids && python setup.py develop
92+
9093
# Installing nipype
9194
COPY . /src/nipype
9295
RUN cd /src/nipype && \

doc/devel/gitwash/known_projects.inc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
.. _`PROJECTNAME mailing list`: http://projects.scipy.org/mailman/listinfo/nipy-devel
77

88
.. numpy
9-
.. _numpy: hhttp://numpy.scipy.org
9+
.. _numpy: http://numpy.scipy.org
1010
.. _`numpy github`: http://github.com/numpy/numpy
1111
.. _`numpy mailing list`: http://mail.scipy.org/mailman/listinfo/numpy-discussion
1212

doc/users/install.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ use the following command::
4747
While `all` installs everything, one can also install select components as
4848
listed below::
4949

50-
'doc': ['Sphinx>=1.4', 'matplotlib', 'pydotplus'],
50+
'doc': ['Sphinx>=1.4', 'matplotlib', 'pydotplus', 'pydot>=1.2.3'],
5151
'tests': ['pytest-cov', 'codecov'],
5252
'nipy': ['nitime', 'nilearn', 'dipy', 'nipy', 'matplotlib'],
5353
'profiler': ['psutil'],

docker/base.Dockerfile

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ ENV PATH=/usr/lib/fsl/5.0:/usr/lib/afni/bin:$ANTSPATH:$PATH
109109

110110
# Installing and setting up c3d
111111
RUN mkdir -p /opt/c3d && \
112-
curl -sSL "http://downloads.sourceforge.net/project/c3d/c3d/1.0.0/c3d-1.0.0-Linux-x86_64.tar.gz" \
112+
curl -sSL "https://files.osf.io/v1/resources/nefdp/providers/osfstorage/59ca96a9b83f69025d6b8985?action=download&version=1&direct" \
113113
| tar -xzC /opt/c3d --strip-components 1
114114

115115
ENV C3DPATH=/opt/c3d/
@@ -149,4 +149,3 @@ ENV MATLABCMD="/opt/mcr/v85/toolbox/matlab" \
149149
FORCE_SPMMCR=1
150150

151151
WORKDIR /work
152-

examples/dmri_dtk_dti.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737

3838
package_check('numpy', '1.3', 'tutorial1')
3939
package_check('scipy', '0.7', 'tutorial1')
40-
package_check('networkx', '1.0', 'tutorial1')
4140
package_check('IPython', '0.10', 'tutorial1')
4241

4342

examples/dmri_dtk_odf.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737

3838
package_check('numpy', '1.3', 'tutorial1')
3939
package_check('scipy', '0.7', 'tutorial1')
40-
package_check('networkx', '1.0', 'tutorial1')
4140
package_check('IPython', '0.10', 'tutorial1')
4241

4342

examples/dmri_fsl_dti.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@
3737

3838
package_check('numpy', '1.3', 'tutorial1')
3939
package_check('scipy', '0.7', 'tutorial1')
40-
package_check('networkx', '1.0', 'tutorial1')
4140
package_check('IPython', '0.10', 'tutorial1')
4241

4342

examples/fmri_ants_openfmri.py

Lines changed: 2 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
import nipype.pipeline.engine as pe
2727
import nipype.algorithms.modelgen as model
2828
import nipype.algorithms.rapidart as ra
29-
from nipype.algorithms.misc import TSNR
29+
from nipype.algorithms.misc import TSNR, CalculateMedian
3030
from nipype.interfaces.c3 import C3dAffineTool
3131
from nipype.interfaces import fsl, Function, ants, freesurfer as fs
3232
import nipype.interfaces.io as nio
@@ -55,33 +55,6 @@
5555
'from scipy.special import legendre'
5656
]
5757

58-
def median(in_files):
59-
"""Computes an average of the median of each realigned timeseries
60-
61-
Parameters
62-
----------
63-
64-
in_files: one or more realigned Nifti 4D time series
65-
66-
Returns
67-
-------
68-
69-
out_file: a 3D Nifti file
70-
"""
71-
average = None
72-
for idx, filename in enumerate(filename_to_list(in_files)):
73-
img = nb.load(filename, mmap=NUMPY_MMAP)
74-
data = np.median(img.get_data(), axis=3)
75-
if average is None:
76-
average = data
77-
else:
78-
average = average + data
79-
median_img = nb.Nifti1Image(average / float(idx + 1), img.affine,
80-
img.header)
81-
filename = os.path.join(os.getcwd(), 'median.nii.gz')
82-
median_img.to_filename(filename)
83-
return filename
84-
8558

8659
def create_reg_workflow(name='registration'):
8760
"""Create a FEAT preprocessing workflow together with freesurfer
@@ -818,11 +791,7 @@ def check_behav_list(behav, run_id, conds):
818791
wf.connect(preproc, "outputspec.realigned_files", tsnr, "in_file")
819792

820793
# Compute the median image across runs
821-
calc_median = Node(Function(input_names=['in_files'],
822-
output_names=['median_file'],
823-
function=median,
824-
imports=imports),
825-
name='median')
794+
calc_median = Node(CalculateMedian(), name='median')
826795
wf.connect(tsnr, 'detrended_file', calc_median, 'in_files')
827796

828797
"""

0 commit comments

Comments
 (0)