Skip to content

Commit 4b7781b

Browse files
committed
🎨 Fix numpydoc format
specifically, "the colon must be preceded by a space, or omitted if the type is absent." Ref https://numpydoc.readthedocs.io/en/latest/format.html
1 parent 243407d commit 4b7781b

File tree

24 files changed

+180
-174
lines changed

24 files changed

+180
-174
lines changed

CPAC/anat_preproc/lesion_preproc.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,12 @@ def inverse_lesion(lesion_path):
1212
1313
Parameters
1414
----------
15-
lesion_path: str
15+
lesion_path : str
1616
path to the nifti file to be checked and inverted if needed
1717
1818
Returns
1919
-------
20-
lesion_out: str
20+
lesion_out : str
2121
path to the output file, if the lesion does not require to be inverted
2222
it returns the unchanged lesion_path input
2323
"""

CPAC/generate_motion_statistics/generate_motion_statistics.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -469,9 +469,9 @@ def gen_power_parameters(subject_id, scan_id, fdp=None, fdj=None, dvars=None,
469469
subject name or id
470470
scan_id : string
471471
scan name or id
472-
FDP_1D: string
472+
FDP_1D : string
473473
framewise displacement(FD as per power et al., 2012) file path
474-
FDJ_1D: string
474+
FDJ_1D : string
475475
framewise displacement(FD as per jenkinson et al., 2002) file path
476476
threshold : float
477477
scrubbing threshold set in the configuration

CPAC/longitudinal_pipeline/longitudinal_preproc.py

Lines changed: 20 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ def norm_transformation(input_mat):
6464
6565
Parameters
6666
----------
67-
input_mat: str or numpy.ndarray
67+
input_mat : str or numpy.ndarray
6868
Either the path to text file matrix or a matrix already imported.
6969
7070
Returns
@@ -105,12 +105,12 @@ def template_convergence(mat_file, mat_type='matrix',
105105
106106
Parameters
107107
----------
108-
mat_file: str
108+
mat_file : str
109109
path to an fsl flirt matrix
110-
mat_type: str
110+
mat_type : str
111111
'matrix'(default), 'ITK'
112112
The type of matrix used to represent the transformations
113-
convergence_threshold: float
113+
convergence_threshold : float
114114
(numpy.finfo(np.float64).eps (default)) threshold for the convergence
115115
The threshold is how different from no transformation is the
116116
transformation matrix.
@@ -141,22 +141,22 @@ def create_temporary_template(input_brain_list, input_skull_list,
141141
142142
Parameters
143143
----------
144-
input_brain_list: list of str
144+
input_brain_list : list of str
145145
list of brain image paths
146-
input_skull_list: list of str
146+
input_skull_list : list of str
147147
list of skull image paths
148-
output_brain_path: Nifti1Image
148+
output_brain_path : Nifti1Image
149149
temporary longitudinal brain template
150-
output_skull_path: Nifti1Image
150+
output_skull_path : Nifti1Image
151151
temporary longitudinal skull template
152-
avg_method: str
152+
avg_method : str
153153
function names from numpy library such as 'median', 'mean', 'std' ...
154154
155155
Returns
156156
-------
157-
output_brain_path: Nifti1Image
157+
output_brain_path : Nifti1Image
158158
temporary longitudinal brain template
159-
output_skull_path: Nifti1Image
159+
output_skull_path : Nifti1Image
160160
temporary longitudinal skull template
161161
"""
162162

@@ -189,29 +189,29 @@ def register_img_list(input_brain_list, ref_img, dof=12, interp='trilinear', cos
189189
190190
Parameters
191191
----------
192-
input_brain_list: list of str
192+
input_brain_list : list of str
193193
list of brain image paths
194-
ref_img: str
194+
ref_img : str
195195
path to the reference image to which the images will be registered
196-
dof: integer (int of long)
196+
dof : integer (int of long)
197197
number of transform degrees of freedom (FLIRT) (12 by default)
198-
interp: str
198+
interp : str
199199
('trilinear' (default) or 'nearestneighbour' or 'sinc' or 'spline')
200200
final interpolation method used in reslicing
201-
cost: str
201+
cost : str
202202
('mutualinfo' or 'corratio' (default) or 'normcorr' or 'normmi' or
203203
'leastsq' or 'labeldiff' or 'bbr')
204204
cost function
205-
thread_pool: int or multiprocessing.dummy.Pool
205+
thread_pool : int or multiprocessing.dummy.Pool
206206
(default 2) number of threads. You can also provide a Pool so the
207207
node will be added to it to be run.
208-
duplicated_basename: boolean
208+
duplicated_basename : boolean
209209
whether there exists duplicated basename which may happen in non-BIDS dataset
210-
unique_id_list: list
210+
unique_id_list : list
211211
a list of unique IDs in data
212212
Returns
213213
-------
214-
node_list: list of Node
214+
node_list : list of Node
215215
each Node 'node' has been run and
216216
node.inputs.out_file contains the path to the registered image
217217
node.inputs.out_matrix_file contains the path to the transformation

CPAC/longitudinal_pipeline/longitudinal_workflow.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -690,7 +690,7 @@ def connect_anat_preproc_inputs(strat, anat_preproc, strat_name,
690690
name of the strategy
691691
strat_nodes_list_list : list
692692
a list of strat_nodes_list
693-
workflow: Workflow
693+
workflow : Workflow
694694
main longitudinal workflow
695695
696696
Returns

CPAC/network_centrality/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -98,20 +98,20 @@ def check_centrality_params(method_option, threshold_option, threshold):
9898
9999
Parameters
100100
----------
101-
method_option: str or int
101+
method_option : str or int
102102
one of {m_options} or index of option
103103
104-
threshold_option: str
104+
threshold_option : str
105105
one of {t_options} or index of option
106106
107107
threshold: float
108108
109109
Returns
110110
-------
111-
method_option: str
111+
method_option : str
112112
one of {m_options}
113113
114-
threshold_option: str
114+
threshold_option : str
115115
one of {t_options}
116116
'''
117117

CPAC/nuisance/utils/compcor.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -117,13 +117,13 @@ def _cosine_drift(period_cut, frametimes):
117117
Create a cosine drift matrix with periods greater or equals to period_cut
118118
Parameters
119119
----------
120-
period_cut: float
120+
period_cut : float
121121
Cut period of the low-pass filter (in sec)
122-
frametimes: array of shape(nscans)
122+
frametimes : array of shape(nscans)
123123
The sampling times (in sec)
124124
Returns
125125
-------
126-
cdrift: array of shape(n_scans, n_drifts)
126+
cdrift : array of shape(n_scans, n_drifts)
127127
cosin drifts plus a constant regressor at cdrift[:,0]
128128
Ref: http://en.wikipedia.org/wiki/Discrete_cosine_transform DCT-II
129129
"""
@@ -152,11 +152,11 @@ def _full_rank(X, cmax=1e15):
152152
to guarantee that the condition number is smaller than a given threshold.
153153
Parameters
154154
----------
155-
X: array of shape(nrows, ncols)
155+
X : array of shape(nrows, ncols)
156156
cmax=1.e-15, float tolerance for condition number
157157
Returns
158158
-------
159-
X: array of shape(nrows, ncols) after regularization
159+
X : array of shape(nrows, ncols) after regularization
160160
cmax=1.e-15, float tolerance for condition number
161161
"""
162162
U, s, V = fallback_svd(X, full_matrices=False)

CPAC/pipeline/nipype_pipeline_engine/engine.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,13 @@ def _doctest_skiplines(docstring, lines_to_skip):
1717
1818
Parameters
1919
----------
20-
docstring: str
20+
docstring : str
2121
22-
lines_to_skip: set or list
22+
lines_to_skip : set or list
2323
2424
Returns
2525
-------
26-
docstring: str
26+
docstring : str
2727
2828
Examples
2929
--------

CPAC/pypeer/peer.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ def motion_scrub(_ms_filename, _motion_threshold):
7878
----------
7979
_ms_filename : string
8080
Pathname of the CSV file containing the framewise displacement per time point for a given fMRI scan
81-
_motion_threshold : float
81+
_motion_threshold : float
8282
Threshold for high motion (framewise displacement, defined by Power et al. 2012)
8383
Returns
8484
-------

CPAC/qc/utils.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1254,7 +1254,7 @@ def gen_motion_plt(motion_parameters):
12541254
Parameters
12551255
----------
12561256
1257-
motion_parameters: string
1257+
motion_parameters : string
12581258
Motion Parameters file
12591259
12601260
Returns
@@ -2319,16 +2319,16 @@ def jc(input1, input2):
23192319
23202320
Parameters
23212321
----------
2322-
input1: array_like
2322+
input1 : array_like
23232323
Input data containing objects. Can be any type but will be converted
23242324
into binary: background where 0, object everywhere else.
2325-
input2: array_like
2325+
input2 : array_like
23262326
Input data containing objects. Can be any type but will be converted
23272327
into binary: background where 0, object everywhere else.
23282328
23292329
Returns
23302330
-------
2331-
jc: float
2331+
jc : float
23322332
The Jaccard coefficient between the object(s) in `input1` and the
23332333
object(s) in `input2`. It ranges from 0 (no overlap) to 1 (perfect overlap).
23342334

CPAC/registration/output_func_to_standard.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,35 +33,35 @@ def fsl_apply_transform_func_to_mni(
3333
3434
Parameters
3535
----------
36-
workflow: Nipype workflow object
36+
workflow : Nipype workflow object
3737
the workflow containing the resources involved
38-
output_name: str
38+
output_name : str
3939
what the name of the warped functional should be when written to the
4040
resource pool
41-
func_key: string
41+
func_key : string
4242
resource pool key correspoding to the node containing the 3D or 4D
4343
functional file to be written into MNI space, use 'leaf' for a
4444
leaf node
45-
ref_key: string
45+
ref_key : string
4646
resource pool key correspoding to the file path to the template brain
4747
used for functional-to-template registration
48-
num_strat: int
48+
num_strat : int
4949
the number of strategy objects
50-
strat: C-PAC Strategy object
50+
strat : C-PAC Strategy object
5151
a strategy with one or more resource pools
52-
interpolation_method: str
52+
interpolation_method : str
5353
which interpolation to use when applying the warps
54-
distcor: boolean
54+
distcor : boolean
5555
indicates whether a distortion correction transformation should be
5656
added to the transforms, this of course requires that a distortion
5757
correction map exist in the resource pool
58-
map_node: boolean
58+
map_node : boolean
5959
indicates whether a mapnode should be used, if TRUE func_key is
6060
expected to correspond to a list of resources that should each
6161
be written into standard space with the other parameters
62-
func_ts: boolean
62+
func_ts : boolean
6363
indicates whether the input image is a 4D time series
64-
num_cpus: int
64+
num_cpus : int
6565
the number of CPUs dedicated to each participant workflow - this
6666
is used to determine how to parallelize the warp application step
6767

0 commit comments

Comments
 (0)