Skip to content

Commit cfb9b9f

Browse files
committed
mass updates
1 parent 654f35e commit cfb9b9f

File tree

13 files changed

+508
-368
lines changed

13 files changed

+508
-368
lines changed

dmriprep/cli.py

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -40,13 +40,26 @@
4040
'sub-<participant_label> from the BIDS spec (the "sub-" '
4141
'prefix can be removed). If this parameter is not provided '
4242
'all subjects will be analyzed. Multiple participants '
43-
'can be specified with a space delimited list.'
43+
'can be specified with a space delimited list.',
44+
multiple=True
45+
)
46+
@click.option(
47+
'--session_label',
48+
default=None,
49+
help='The label(s) of session(s) that should be analyzed. '
50+
'the label corresponds to ses-<session_label from the '
51+
'BIDS spec (the "ses-" prefix can be removed). If this '
52+
'parameter is not provided, all sessions will be '
53+
'analyzed. Multiple sessions can be specified with '
54+
'a space delimited list.',
55+
multiple=True
4456
)
4557
# options for prepping dwi scans
4658
@click.option(
4759
'--concat_dwis',
4860
default=None,
4961
help='A space delimited list of acq-<label>',
62+
multiple=True
5063
)
5164
@click.option(
5265
'--b0_thresh',
@@ -115,7 +128,7 @@
115128
'--ignore',
116129
'-i',
117130
help='Specify which node(s) to skip during the preprocessing of the dwi.',
118-
type=click.Choice(['denoise', 'unring', 'fieldmaps']),
131+
type=click.Choice(['denoising', 'unringing', 'fieldmaps']),
119132
multiple=True,
120133
)
121134
@click.option(
@@ -132,6 +145,7 @@
132145
)
133146
def main(
134147
participant_label,
148+
session_label,
135149
bids_dir,
136150
output_dir,
137151
analysis_level,
@@ -185,6 +199,7 @@ def main(
185199

186200
wf = init_dmriprep_wf(
187201
subject_list=subject_list,
202+
session_list=session_label,
188203
layout=layout,
189204
output_dir=output_dir,
190205
work_dir=work_dir,
@@ -194,6 +209,7 @@ def main(
194209
output_resolution=output_resolution,
195210
bet_dwi=bet_dwi,
196211
bet_mag=bet_mag,
212+
nthreads=nthreads,
197213
omp_nthreads=omp_nthreads,
198214
synb0_dir=synb0_dir
199215
)

dmriprep/data/boilerplate.bib

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
@article{van2011numpy,
2+
title={The NumPy array: a structure for efficient numerical computation},
3+
author={Van Der Walt, Stefan and Colbert, S Chris and Varoquaux, Gael},
4+
journal={Computing in Science \& Engineering},
5+
volume={13},
6+
number={2},
7+
pages={22--30},
8+
year={2011},
9+
publisher={AIP Publishing},
10+
doi={10.1109/MCSE.2011.37}
11+
}
12+
113
@article{nipype1,
214
author = {Gorgolewski, K. and Burns, C. D. and Madison, C. and Clark, D. and Halchenko, Y. O. and Waskom, M. L. and Ghosh, S.},
315
doi = {10.3389/fninf.2011.00013},

dmriprep/data/eddy_parameters.json

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
{
2+
"flm": "quadratic",
3+
"slm": "none",
4+
"fwhm": 0,
5+
"niter": 5,
6+
"fep": false,
7+
"interp": "spline",
8+
"method": "jac",
9+
"nvoxhp": 1000,
10+
"fudge_factor": 10,
11+
"dont_sep_offs_move": false,
12+
"dont_peas": false,
13+
"repol": true,
14+
"outlier_nstd": 4,
15+
"outlier_nvox": 250,
16+
"outlier_type": "sw",
17+
"outlier_pos": false,
18+
"outlier_sqr": false,
19+
"estimate_mov_by_susceptibility": false,
20+
"is_shelled": false,
21+
"num_threads": 1,
22+
"use_cuda": false,
23+
"cnr_maps": true,
24+
"residuals": true,
25+
"output_type": "NIFTI_GZ",
26+
"args": ""
27+
}

dmriprep/due.py

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
# emacs: at the end of the file
2+
# ex: set sts=4 ts=4 sw=4 et:
3+
# ## ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### ### #
4+
"""
5+
6+
Stub file for a guaranteed safe import of duecredit constructs: if duecredit
7+
is not available.
8+
9+
To use it, place it into your project codebase to be imported, e.g. copy as
10+
11+
cp stub.py /path/tomodule/module/due.py
12+
13+
Note that it might be better to avoid naming it duecredit.py to avoid shadowing
14+
installed duecredit.
15+
16+
Then use in your code as
17+
18+
from .due import due, Doi, BibTeX, Text
19+
20+
See https://github.com/duecredit/duecredit/blob/master/README.md for examples.
21+
22+
Origin: Originally a part of the duecredit
23+
Copyright: 2015-2019 DueCredit developers
24+
License: BSD-2
25+
"""
26+
27+
__version__ = '0.0.8'
28+
29+
30+
class InactiveDueCreditCollector(object):
31+
"""Just a stub at the Collector which would not do anything"""
32+
def _donothing(self, *args, **kwargs):
33+
"""Perform no good and no bad"""
34+
pass
35+
36+
def dcite(self, *args, **kwargs):
37+
"""If I could cite I would"""
38+
def nondecorating_decorator(func):
39+
return func
40+
return nondecorating_decorator
41+
42+
active = False
43+
activate = add = cite = dump = load = _donothing
44+
45+
def __repr__(self):
46+
return self.__class__.__name__ + '()'
47+
48+
49+
def _donothing_func(*args, **kwargs):
50+
"""Perform no good and no bad"""
51+
pass
52+
53+
54+
try:
55+
from duecredit import due, BibTeX, Doi, Url, Text
56+
if 'due' in locals() and not hasattr(due, 'cite'):
57+
raise RuntimeError(
58+
"Imported due lacks .cite. DueCredit is now disabled")
59+
except Exception as e:
60+
if not isinstance(e, ImportError):
61+
import logging
62+
logging.getLogger("duecredit").error(
63+
"Failed to import duecredit due to %s" % str(e))
64+
# Initiate due stub
65+
due = InactiveDueCreditCollector()
66+
BibTeX = Doi = Url = Text = _donothing_func
67+
68+
# Emacs mode definitions
69+
# Local Variables:
70+
# mode: python
71+
# py-indent-offset: 4
72+
# tab-width: 4
73+
# indent-tabs-mode: nil
74+
# End:

0 commit comments

Comments
 (0)