Skip to content

Commit 160d1c4

Browse files
committed
fix typos
1 parent d550fe0 commit 160d1c4

File tree

5 files changed

+62
-64
lines changed

5 files changed

+62
-64
lines changed

MANIFEST.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
1-
include AUTHORS.rst
21
include CONTRIBUTING.rst
3-
include HISTORY.rst
2+
include CHANGES.rst
43
include LICENSE
54
include README.rst
65

dmriprep/workflows/fieldmap/base.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,8 +13,7 @@ def init_sdc_prep_wf(
1313
layout,
1414
bet_mag,
1515
#synb0,
16-
omp_nthreads
17-
):
16+
):
1817

1918
sdc_prep_wf = pe.Workflow(name='sdc_prep_wf')
2019

dmriprep/workflows/fieldmap/fmap.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ def init_fmap_wf(bet_mag):
2121
fsl.BinaryMaths(operation='div', operand_value=6.28), name='radToHz'
2222
)
2323

24-
mag_bet = pe.Node(fsl.BET(frac=bet_mag, mask=True, robust=True),name='mag_bet')))
24+
mag_bet = pe.Node(fsl.BET(frac=bet_mag, mask=True, robust=True), name='mag_bet')
2525

2626
mag_flirt = pe.Node(fsl.FLIRT(dof=6), name='magFlirt')
2727

dmriprep/workflows/fieldmap/pepolar.py

Lines changed: 58 additions & 58 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66

77
def init_pepolar_wf(subject_id, dwi_meta, epi_fmaps):
88

9-
dwi_file_pe = dwi_meta["PhaseEncodingDirection"]
9+
dwi_file_pe = dwi_meta['PhaseEncodingDirection']
1010

1111
file2dir = dict()
1212

@@ -23,22 +23,22 @@ def init_pepolar_wf(subject_id, dwi_meta, epi_fmaps):
2323

2424
if not usable_fieldmaps_opposite_pe:
2525
raise Exception(
26-
"None of the discovered fieldmaps for "
27-
"participant {} has the right phase "
28-
"encoding direction".format(subject_id)
26+
'None of the discovered fieldmaps for '
27+
'participant {} has the right phase '
28+
'encoding direction'.format(subject_id)
2929
)
3030

31-
wf = pe.Workflow(name="pepolar_wf")
31+
wf = pe.Workflow(name='pepolar_wf')
3232

3333
inputnode = pe.Node(
34-
niu.IdentityInterface(fields=["b0_stripped"]), name="inputnode"
34+
niu.IdentityInterface(fields=['b0_stripped']), name='inputnode'
3535
)
3636

3737
outputnode = pe.Node(
3838
niu.IdentityInterface(
39-
fields=["out_topup", "out_movpar", "out_fmap", "out_enc_file"]
39+
fields=['out_topup', 'out_movpar', 'out_fmap', 'out_enc_file']
4040
),
41-
name="outputnode",
41+
name='outputnode',
4242
)
4343

4444
topup_wf = init_topup_wf()
@@ -47,7 +47,7 @@ def init_pepolar_wf(subject_id, dwi_meta, epi_fmaps):
4747

4848
if not usable_fieldmaps_matching_pe:
4949
wf.connect(
50-
[(inputnode, topup_wf, [("b0_stripped", "inputnode.epi_file")])]
50+
[(inputnode, topup_wf, [('b0_stripped', 'inputnode.epi_file')])]
5151
)
5252
else:
5353
topup_wf.inputs.inputnode.epi_file = usable_fieldmaps_matching_pe[0]
@@ -57,12 +57,12 @@ def init_pepolar_wf(subject_id, dwi_meta, epi_fmaps):
5757
topup_wf.inputs.inputnode.altepi_file,
5858
]
5959
dir_map = {
60-
"i": "x",
61-
"i-": "x-",
62-
"j": "y",
63-
"j-": "y-",
64-
"k": "z",
65-
"k-": "z-",
60+
'i': 'x',
61+
'i-': 'x-',
62+
'j': 'y',
63+
'j-': 'y-',
64+
'k': 'z',
65+
'k-': 'z-',
6666
}
6767
topup_wf.inputs.inputnode.encoding_directions = [
6868
dir_map[file2dir[file]] for file in epi_list
@@ -74,10 +74,10 @@ def init_pepolar_wf(subject_id, dwi_meta, epi_fmaps):
7474
topup_wf,
7575
outputnode,
7676
[
77-
("outputnode.out_fmap", "out_fmap"),
78-
("outputnode.out_movpar", "out_movpar"),
79-
("outputnode.out_base", "out_topup"),
80-
("outputnode.out_enc_file", "out_enc_file"),
77+
('outputnode.out_fmap', 'out_fmap'),
78+
('outputnode.out_movpar', 'out_movpar'),
79+
('outputnode.out_base', 'out_topup'),
80+
('outputnode.out_enc_file', 'out_enc_file'),
8181
],
8282
)
8383
]
@@ -87,43 +87,43 @@ def init_pepolar_wf(subject_id, dwi_meta, epi_fmaps):
8787

8888

8989
def init_synb0_wf(subject_id, dwi_meta, synb0):
90-
dwi_file_pe = dwi_meta["PhaseEncodingDirection"]
90+
dwi_file_pe = dwi_meta['PhaseEncodingDirection']
9191

9292
file2dir = dict()
9393

9494
usable_fieldmaps_matching_pe = []
9595
usable_fieldmaps_opposite_pe = []
9696

97-
wf = pe.Workflow(name="synb0_wf")
97+
wf = pe.Workflow(name='synb0_wf')
9898

9999
inputnode = pe.Node(
100-
niu.IdentityInterface(fields=["b0_stripped"]), name="inputnode"
100+
niu.IdentityInterface(fields=['b0_stripped']), name='inputnode'
101101
)
102102

103103
outputnode = pe.Node(
104104
niu.IdentityInterface(
105-
fields=["out_topup", "out_movpar", "out_fmap", "out_enc_file"]
105+
fields=['out_topup', 'out_movpar', 'out_fmap', 'out_enc_file']
106106
),
107-
name="outputnode",
107+
name='outputnode',
108108
)
109109

110110
topup_wf = init_topup_wf(use_acqp=True)
111111
topup_wf.inputs.inputnode.altepi_file = synb0
112112
wf.add_nodes([inputnode])
113113
wf.connect(
114-
[(inputnode, topup_wf, [("b0_stripped", "inputnode.epi_file")])]
114+
[(inputnode, topup_wf, [('b0_stripped', 'inputnode.epi_file')])]
115115
)
116-
topup_wf.inputs.inputnode.acqp = "/scratch/smansour/synb0_acqp.txt"
116+
topup_wf.inputs.inputnode.acqp = '/scratch/smansour/synb0_acqp.txt'
117117

118118
wf.connect(
119119
[
120120
(
121121
topup_wf,
122122
outputnode,
123123
[
124-
("outputnode.out_fmap", "out_fmap"),
125-
("outputnode.out_movpar", "out_movpar"),
126-
("outputnode.out_base", "out_topup"),
124+
('outputnode.out_fmap', 'out_fmap'),
125+
('outputnode.out_movpar', 'out_movpar'),
126+
('outputnode.out_base', 'out_topup'),
127127
],
128128
)
129129
]
@@ -135,77 +135,77 @@ def init_synb0_wf(subject_id, dwi_meta, synb0):
135135
def init_topup_wf(use_acqp=False):
136136
from ...interfaces import mrtrix3
137137

138-
wf = pe.Workflow(name="topup_wf")
138+
wf = pe.Workflow(name='topup_wf')
139139

140140
inputnode = pe.Node(
141141
niu.IdentityInterface(
142142
fields=[
143-
"epi_file",
144-
"altepi_file",
145-
"encoding_directions",
146-
"topup_name",
147-
"acqp",
143+
'epi_file',
144+
'altepi_file',
145+
'encoding_directions',
146+
'topup_name',
147+
'acqp',
148148
]
149149
),
150-
name="inputnode",
150+
name='inputnode',
151151
)
152-
inputnode.inputs.topup_name = "topup_base"
152+
inputnode.inputs.topup_name = 'topup_base'
153153

154-
epi_flirt = pe.Node(fsl.FLIRT(), name="epi_flirt")
154+
epi_flirt = pe.Node(fsl.FLIRT(), name='epi_flirt')
155155

156156
outputnode = pe.Node(
157157
niu.IdentityInterface(
158-
fields=["out_fmap", "out_movpar", "out_base", "out_enc_file"]
158+
fields=['out_fmap', 'out_movpar', 'out_base', 'out_enc_file']
159159
),
160-
name="outputnode",
160+
name='outputnode',
161161
)
162162

163-
list_merge = pe.Node(niu.Merge(numinputs=2), name="list_merge")
163+
list_merge = pe.Node(niu.Merge(numinputs=2), name='list_merge')
164164

165-
merge = pe.Node(fsl.Merge(dimension="t"), name="mergeAPPA")
165+
merge = pe.Node(fsl.Merge(dimension='t'), name='mergeAPPA')
166166

167167
# Resize (make optional)
168-
resize = pe.Node(mrtrix3.MRResize(voxel_size=[1]), name="epi_resize")
168+
resize = pe.Node(mrtrix3.MRResize(voxel_size=[1]), name='epi_resize')
169169

170-
topup = pe.Node(fsl.TOPUP(), name="topup")
170+
topup = pe.Node(fsl.TOPUP(), name='topup')
171171

172-
get_base_movpar = lambda x: x.split("_movpar.txt")[0]
172+
get_base_movpar = lambda x: x.split('_movpar.txt')[0]
173173

174174
if use_acqp:
175-
wf.connect([(inputnode, topup, [("acqp", "encoding_file")])])
175+
wf.connect([(inputnode, topup, [('acqp', 'encoding_file')])])
176176
else:
177177
topup.inputs.readout_times = [0.05, 0.05]
178178
wf.connect(
179179
[
180180
(
181181
inputnode,
182182
topup,
183-
[("encoding_directions", "encoding_direction")],
183+
[('encoding_directions', 'encoding_direction')],
184184
)
185185
]
186186
)
187187

188188
wf.connect(
189189
[
190-
(inputnode, list_merge, [("epi_file", "in1")]),
190+
(inputnode, list_merge, [('epi_file', 'in1')]),
191191
(
192192
inputnode,
193193
epi_flirt,
194-
[("altepi_file", "in_file"), ("epi_file", "reference")],
194+
[('altepi_file', 'in_file'), ('epi_file', 'reference')],
195195
),
196-
(epi_flirt, list_merge, [("out_file", "in2")]),
197-
(list_merge, merge, [("out", "in_files")]),
198-
# (merge, resize, [("merged_file", "in_file")]),
199-
# (resize, topup, [("out_file", "in_file")]),
200-
(merge, topup, [("merged_file", "in_file")]),
196+
(epi_flirt, list_merge, [('out_file', 'in2')]),
197+
(list_merge, merge, [('out', 'in_files')]),
198+
# (merge, resize, [('merged_file', 'in_file')]),
199+
# (resize, topup, [('out_file', 'in_file')]),
200+
(merge, topup, [('merged_file', 'in_file')]),
201201
(
202202
topup,
203203
outputnode,
204204
[
205-
("out_field", "out_fmap"),
206-
("out_movpar", "out_movpar"),
207-
("out_enc_file", "out_enc_file"),
208-
(("out_movpar", get_base_movpar), "out_base"),
205+
('out_field', 'out_fmap'),
206+
('out_movpar', 'out_movpar'),
207+
('out_enc_file', 'out_enc_file'),
208+
(('out_movpar', get_base_movpar), 'out_base'),
209209
],
210210
),
211211
]

dmriprep/workflows/fieldmap/phasediff.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ def init_phdiff_wf(bet_mag):
7676
(delta, prep_fmap, [('out_value', 'delta_TE')]),
7777
(prep_fmap, fslroi, [('out_fieldmap', 'in_file')]),
7878
(fslroi, outputnode, [('roi_file', 'out_fmap')]),
79-
(mag_bet, outputnode, [('magnitude1', 'out_mag')])
79+
(mag_bet, outputnode, [('out_file', 'out_mag')])
8080
])
8181

8282
return wf

0 commit comments

Comments
 (0)