Skip to content

Commit 43edc43

Browse files
authored
Merge branch 'master' into dwifslpreproc
2 parents 4ab9084 + 3b50532 commit 43edc43

28 files changed

+220
-348
lines changed

.github/workflows/package.yml

+3
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ on:
88
- rel/*
99
tags:
1010
- '*'
11+
schedule:
12+
# 8am EST / 9am EDT Mondays
13+
- cron: '0 13 * * 1'
1114

1215
defaults:
1316
run:

.github/workflows/tests.yml

+3
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ on:
1515
branches:
1616
- master
1717
- maint/*
18+
schedule:
19+
# 8am EST / 9am EDT Mondays
20+
- cron: '0 13 * * 1'
1821

1922
defaults:
2023
run:

.mailmap

+3
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,10 @@ Franz Liem <[email protected]>
7575
Franz Liem <[email protected]> <franz.liem>
7676
Fred Loney <[email protected]>
7777
Gael Varoquaux <[email protected]>
78+
Gal Ben-Zvi <[email protected]>
7879
80+
Ghislain Vaillant <[email protected]>
81+
7982
Gilles de Hollander <[email protected]>
8083
Gio Piantoni <[email protected]>
8184
Guillaume Flandin <[email protected]>

.zenodo.json

+25-25
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
},
5959
{
6060
"affiliation": "Klinikum rechts der Isar, TUM. ACPySS",
61-
"name": "Manh\u00e3es-Savio, Alexandre",
61+
"name": "Manhães-Savio, Alexandre",
6262
"orcid": "0000-0002-6608-6885"
6363
},
6464
{
@@ -127,7 +127,7 @@
127127
},
128128
{
129129
"affiliation": "Stanford University",
130-
"name": "\u0106iri\u0107 , Rastko",
130+
"name": "Ćirić , Rastko",
131131
"orcid": "0000-0001-6347-7939"
132132
},
133133
{
@@ -214,7 +214,7 @@
214214
"name": "Tungaraza, Rosalia"
215215
},
216216
{
217-
"affiliation": "Charit\u00e8 Universit\u00e4tsmedizin Berlin, Germany",
217+
"affiliation": "Charitè Universitätsmedizin Berlin, Germany",
218218
"name": "Dell'Orco, Andrea",
219219
"orcid": "0000-0002-3964-8360"
220220
},
@@ -277,7 +277,7 @@
277277
},
278278
{
279279
"affiliation": "ARAMIS LAB, Brain and Spine Institute (ICM), Paris, France.",
280-
"name": "Guillon, Je\u0301re\u0301my",
280+
"name": "Guillon, Jérémy",
281281
"orcid": "0000-0002-2672-7510"
282282
},
283283
{
@@ -314,7 +314,7 @@
314314
"orcid": "0000-0001-9130-1092"
315315
},
316316
{
317-
"affiliation": "Division of Psychological and Social Medicine and Developmental Neuroscience, Faculty of Medicine, Technische Universit\u00e4t Dresden, Dresden, Germany",
317+
"affiliation": "Division of Psychological and Social Medicine and Developmental Neuroscience, Faculty of Medicine, Technische Universität Dresden, Dresden, Germany",
318318
"name": "Bernardoni, Fabio",
319319
"orcid": "0000-0002-5112-405X"
320320
},
@@ -324,15 +324,15 @@
324324
"orcid": "0000-0002-0805-1350"
325325
},
326326
{
327-
"affiliation": "Division of Psychological and Social Medicine and Developmental Neuroscience, Faculty of Medicine, Technische Universit\u00e4t Dresden, Dresden, Germany",
327+
"affiliation": "Division of Psychological and Social Medicine and Developmental Neuroscience, Faculty of Medicine, Technische Universität Dresden, Dresden, Germany",
328328
"name": "Geisler, Daniel",
329329
"orcid": "0000-0003-2076-5329"
330330
},
331331
{
332332
"name": "Salvatore, John"
333333
},
334334
{
335-
"affiliation": "CNRS LTCI, Telecom ParisTech, Universit\u00e9 Paris-Saclay",
335+
"affiliation": "CNRS LTCI, Telecom ParisTech, Université Paris-Saclay",
336336
"name": "Gramfort, Alexandre",
337337
"orcid": "0000-0001-9791-4404"
338338
},
@@ -392,13 +392,18 @@
392392
"name": "Liem, Franz",
393393
"orcid": "0000-0003-0646-4810"
394394
},
395+
{
396+
"affiliation": "ARAMIS Lab, Paris Brain Institute",
397+
"name": "Vaillant, Ghislain",
398+
"orcid": "0000-0003-0267-3033"
399+
},
395400
{
396401
"affiliation": "Neurospin/Unicog/Inserm/CEA",
397402
"name": "Perez-Guevara, Martin Felipe",
398403
"orcid": "0000-0003-4497-861X"
399404
},
400405
{
401-
"name": "Heinsfeld, Anibal S\u00f3lon",
406+
"name": "Heinsfeld, Anibal Sólon",
402407
"orcid": "0000-0002-2050-0614"
403408
},
404409
{
@@ -417,7 +422,7 @@
417422
"name": "Poldrack, Russell"
418423
},
419424
{
420-
"affiliation": "1 McGill Centre for Integrative Neuroscience (MCIN), Ludmer Centre for Neuroinformatics and Mental Health, Montreal Neurological Institute (MNI), McGill University, Montr\u00e9al, 3801 University Street, WB-208, H3A 2B4, Qu\u00e9bec, Canada. 2 University of Lyon, CNRS, INSERM, CREATIS., Villeurbanne, 7, avenue Jean Capelle, 69621, France.",
425+
"affiliation": "1 McGill Centre for Integrative Neuroscience (MCIN), Ludmer Centre for Neuroinformatics and Mental Health, Montreal Neurological Institute (MNI), McGill University, Montréal, 3801 University Street, WB-208, H3A 2B4, Québec, Canada. 2 University of Lyon, CNRS, INSERM, CREATIS., Villeurbanne, 7, avenue Jean Capelle, 69621, France.",
421426
"name": "Glatard, Tristan",
422427
"orcid": "0000-0003-2620-5883"
423428
},
@@ -436,7 +441,7 @@
436441
},
437442
{
438443
"affiliation": "University College London",
439-
"name": "P\u00e9rez-Garc\u00eda, Fernando",
444+
"name": "Pérez-García, Fernando",
440445
"orcid": "0000-0001-9090-3024"
441446
},
442447
{
@@ -451,6 +456,11 @@
451456
"affiliation": "University of Iowa",
452457
"name": "Welch, David"
453458
},
459+
{
460+
"affiliation": "Sagol School of Neuroscience, Tel Aviv University",
461+
"name": "Ben-Zvi, Gal",
462+
"orcid": "0000-0002-5655-9423"
463+
},
454464
{
455465
"affiliation": "Max Planck Institute for Human Cognitive and Brain Sciences",
456466
"name": "Contier, Oliver",
@@ -476,7 +486,7 @@
476486
},
477487
{
478488
"affiliation": "Leibniz Institute for Neurobiology",
479-
"name": "Stadler, J\u00f6rg",
489+
"name": "Stadler, Jörg",
480490
"orcid": "0000-0003-4313-129X"
481491
},
482492
{
@@ -538,11 +548,6 @@
538548
"name": "Bielievtsov, Dmytro",
539549
"orcid": "0000-0003-3846-7696"
540550
},
541-
{
542-
"affiliation": "Sagol School of Neuroscience, Tel Aviv University",
543-
"name": "Ben-Zvi, Gal",
544-
"orcid": "0000-0002-5655-9423"
545-
},
546551
{
547552
"affiliation": "University of Newcastle, Australia",
548553
"name": "Cooper, Gavin",
@@ -558,7 +563,7 @@
558563
},
559564
{
560565
"affiliation": "German Institute for International Educational Research",
561-
"name": "Linkersd\u00f6rfer, Janosch",
566+
"name": "Linkersdörfer, Janosch",
562567
"orcid": "0000-0002-1577-1233"
563568
},
564569
{
@@ -572,7 +577,7 @@
572577
"name": "Stanley, Olivia"
573578
},
574579
{
575-
"name": "K\u00fcttner, Ren\u00e9"
580+
"name": "Küttner, René"
576581
},
577582
{
578583
"affiliation": "California Institute of Technology",
@@ -700,11 +705,6 @@
700705
"name": "Lerma-Usabiaga, Garikoitz",
701706
"orcid": "0000-0001-9800-4816"
702707
},
703-
{
704-
"affiliation": "ARAMIS Lab, Paris Brain Institute",
705-
"name": "Vaillant, Ghislain",
706-
"orcid": "0000-0003-0267-3033"
707-
},
708708
{
709709
"name": "Schwabacher, Isaac"
710710
},
@@ -730,7 +730,7 @@
730730
"orcid": "0000-0003-2077-3070"
731731
},
732732
{
733-
"affiliation": "TIB \u2013 Leibniz Information Centre for Science and Technology and University Library, Hannover, Germany",
733+
"affiliation": "TIB Leibniz Information Centre for Science and Technology and University Library, Hannover, Germany",
734734
"name": "Leinweber, Katrin",
735735
"orcid": "0000-0001-5135-5758"
736736
},
@@ -764,7 +764,7 @@
764764
},
765765
{
766766
"affiliation": "Universidad de Guadalajara",
767-
"name": "Gonz\u00e1lez Orozco, Abel A."
767+
"name": "González Orozco, Abel A."
768768
},
769769
{
770770
"affiliation": "ARAMIS Lab",

doc/changelog/1.X.X-changelog.rst

+42
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,45 @@
1+
1.8.3 (July 14, 2022)
2+
=====================
3+
4+
Bug-fix release in the 1.8.x series.
5+
6+
This release includes compatibility fixes for nibabel 4.x and resolves a denial-of-service
7+
bug when the etelemetry server is down that resulted in excessive (blocking) network hits that
8+
would cause any tools using nipype interfaces to take a very long time.
9+
10+
(`Full changelog <https://github.com/nipy/nipype/milestone/1.8.3?closed=1>`__)
11+
12+
* FIX: Argument order to ``numpy.save()`` (https://github.com/nipy/nipype/pull/3485)
13+
* FIX: Add tolerance parameter to ComputeDVARS (https://github.com/nipy/nipype/pull/3489)
14+
* FIX: Delay access of nibabel.trackvis until actually needed (https://github.com/nipy/nipype/pull/3488)
15+
* FIX: Avoid excessive etelemetry pings (https://github.com/nipy/nipype/pull/3484)
16+
* ENH: Added outputs' generation to DWIBiascorrect interface (https://github.com/nipy/nipype/pull/3476)
17+
18+
19+
1.8.2 (June 06, 2022)
20+
=====================
21+
22+
Bug-fix release in the 1.8.x series.
23+
24+
This release restores compatibility with networkx 2.8.3, which errors when
25+
graph nodes might conflict with pydot parsing.
26+
27+
(`Full changelog <https://github.com/nipy/nipype/milestone/1.8.2?closed=1>`__)
28+
29+
* ENH: Enable compression with Gunzip interface (https://github.com/nipy/nipype/pull/3472)
30+
* CI: Schedule weekly tests with cron (https://github.com/nipy/nipype/pull/3480)
31+
32+
33+
1.8.1 (May 16, 2022)
34+
====================
35+
36+
Bug-fix release in the 1.8.x series.
37+
38+
The previous release vendored ``distutils.version.LooseVersion``, and the vendored objects did not
39+
preserve compatiblity with the ``distutils`` objects. This release switches to the
40+
``looseversion`` package that ensures compatiblity.
41+
42+
143
1.8.0 (May 10, 2022)
244
====================
345

doc/interfaces.rst

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ Interfaces and Workflows
88
:Release: |version|
99
:Date: |today|
1010

11-
Previous versions: `1.8.0 <http://nipype.readthedocs.io/en/1.8.0/>`_ `1.7.1 <http://nipype.readthedocs.io/en/1.7.1/>`_
11+
Previous versions: `1.8.2 <http://nipype.readthedocs.io/en/1.8.2/>`_ `1.8.1 <http://nipype.readthedocs.io/en/1.8.1/>`_
1212

1313
Workflows
1414
---------

nipype/__init__.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
import os
1515

1616
# XXX Deprecate this import
17-
from .external.version import LooseVersion
17+
from looseversion import LooseVersion
1818

1919
from .info import URL as __url__, STATUS as __status__, __version__
2020
from .utils.config import NipypeConfig
@@ -98,4 +98,4 @@ def check_latest_version(raise_exception=False):
9898
from .interfaces.base import BaseInterface
9999

100100
if BaseInterface._etelemetry_version_data is None:
101-
BaseInterface._etelemetry_version_data = check_latest_version()
101+
BaseInterface._etelemetry_version_data = check_latest_version() or "n/a"

nipype/algorithms/confounds.py

+28-12
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,11 @@ class ComputeDVARSInputSpec(BaseInterfaceInputSpec):
5050
remove_zerovariance = traits.Bool(
5151
True, usedefault=True, desc="remove voxels with zero variance"
5252
)
53+
variance_tol = traits.Float(
54+
1e-7,
55+
usedefault=True,
56+
desc="maximum variance to consider \"close to\" zero for the purposes of removal",
57+
)
5358
save_std = traits.Bool(True, usedefault=True, desc="save standardized DVARS")
5459
save_nstd = traits.Bool(False, usedefault=True, desc="save non-standardized DVARS")
5560
save_vxstd = traits.Bool(
@@ -167,6 +172,7 @@ def _run_interface(self, runtime):
167172
self.inputs.in_file,
168173
self.inputs.in_mask,
169174
remove_zerovariance=self.inputs.remove_zerovariance,
175+
variance_tol=self.inputs.variance_tol,
170176
intensity_normalization=self.inputs.intensity_normalization,
171177
)
172178

@@ -994,8 +1000,19 @@ def _list_outputs(self):
9941000
return self._results
9951001

9961002

1003+
def _AR_est_YW(x, order, rxx=None):
1004+
"""Retrieve AR coefficients while dropping the sig_sq return value"""
1005+
from nitime.algorithms import AR_est_YW
1006+
1007+
return AR_est_YW(x, order, rxx=rxx)[0]
1008+
1009+
9971010
def compute_dvars(
998-
in_file, in_mask, remove_zerovariance=False, intensity_normalization=1000
1011+
in_file,
1012+
in_mask,
1013+
remove_zerovariance=False,
1014+
intensity_normalization=1000,
1015+
variance_tol=0.0,
9991016
):
10001017
"""
10011018
Compute the :abbr:`DVARS (D referring to temporal
@@ -1027,36 +1044,35 @@ def compute_dvars(
10271044
"""
10281045
import numpy as np
10291046
import nibabel as nb
1030-
from nitime.algorithms import AR_est_YW
10311047
import warnings
10321048

1033-
func = nb.load(in_file).get_fdata(dtype=np.float32)
1034-
mask = np.asanyarray(nb.load(in_mask).dataobj).astype(np.uint8)
1049+
func = np.float32(nb.load(in_file).dataobj)
1050+
mask = np.bool_(nb.load(in_mask).dataobj)
10351051

10361052
if len(func.shape) != 4:
10371053
raise RuntimeError("Input fMRI dataset should be 4-dimensional")
10381054

1039-
idx = np.where(mask > 0)
1040-
mfunc = func[idx[0], idx[1], idx[2], :]
1055+
mfunc = func[mask]
10411056

10421057
if intensity_normalization != 0:
10431058
mfunc = (mfunc / np.median(mfunc)) * intensity_normalization
10441059

10451060
# Robust standard deviation (we are using "lower" interpolation
10461061
# because this is what FSL is doing
10471062
func_sd = (
1048-
np.percentile(mfunc, 75, axis=1, interpolation="lower")
1049-
- np.percentile(mfunc, 25, axis=1, interpolation="lower")
1063+
np.percentile(mfunc, 75, axis=1, method="lower")
1064+
- np.percentile(mfunc, 25, axis=1, method="lower")
10501065
) / 1.349
10511066

10521067
if remove_zerovariance:
1053-
mfunc = mfunc[func_sd != 0, :]
1054-
func_sd = func_sd[func_sd != 0]
1068+
zero_variance_voxels = func_sd > variance_tol
1069+
mfunc = mfunc[zero_variance_voxels, :]
1070+
func_sd = func_sd[zero_variance_voxels]
10551071

10561072
# Compute (non-robust) estimate of lag-1 autocorrelation
10571073
ar1 = np.apply_along_axis(
1058-
AR_est_YW, 1, regress_poly(0, mfunc, remove_mean=True)[0].astype(np.float32), 1
1059-
)[:, 0]
1074+
_AR_est_YW, 1, regress_poly(0, mfunc, remove_mean=True)[0].astype(np.float32), 1
1075+
)
10601076

10611077
# Compute (predicted) standard deviation of temporal difference time series
10621078
diff_sdhat = np.squeeze(np.sqrt(((1 - ar1) * 2).tolist())) * func_sd

0 commit comments

Comments
 (0)