Skip to content

Commit

Permalink
flake8
Browse files Browse the repository at this point in the history
  • Loading branch information
davidmeunier79 committed Feb 28, 2024
1 parent a151856 commit 473b36c
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 31 deletions.
32 changes: 18 additions & 14 deletions macapype/pipelines/prepare.py
Original file line number Diff line number Diff line change
Expand Up @@ -736,29 +736,33 @@ def create_short_preparation_pipe(params, params_template={},

if "use_T2" in params.keys():


if "crop_z_T1" in params.keys():
data_preparation_pipe.connect(crop_z_T1, "out_roi",
outputnode, 'preproc_T2')
data_preparation_pipe.connect(
crop_z_T1, "out_roi",
outputnode, 'preproc_T2')
else:
data_preparation_pipe.connect(crop_aladin_T1, "res_file",
outputnode, 'preproc_T2')
data_preparation_pipe.connect(
crop_aladin_T1, "res_file",
outputnode, 'preproc_T2')

data_preparation_pipe.connect(apply_crop_aladin_T2, 'out_file',
outputnode, 'preproc_T1')
data_preparation_pipe.connect(
apply_crop_aladin_T2, 'out_file',
outputnode, 'preproc_T1')

else:


if "crop_z_T1" in params.keys():
data_preparation_pipe.connect(crop_z_T1, "out_roi",
outputnode, 'preproc_T1')
data_preparation_pipe.connect(
crop_z_T1, "out_roi",
outputnode, 'preproc_T1')
else:
data_preparation_pipe.connect(crop_aladin_T1, "res_file",
outputnode, 'preproc_T1')
data_preparation_pipe.connect(
crop_aladin_T1, "res_file",
outputnode, 'preproc_T1')

data_preparation_pipe.connect(apply_crop_aladin_T2, 'out_file',
outputnode, 'preproc_T2')
data_preparation_pipe.connect(
apply_crop_aladin_T2, 'out_file',
outputnode, 'preproc_T2')

return data_preparation_pipe

Expand Down
17 changes: 1 addition & 16 deletions macapype/pipelines/register.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
NMTSubjectAlign2, NwarpApplyPriors,
animal_warper)


def create_iterative_register_pipe(
template_file, template_brain_file, template_mask_file, gm_prob_file,
wm_prob_file, csf_prob_file, n_iter, name="register_pipe"):
Expand Down Expand Up @@ -504,22 +505,6 @@ def create_native_to_stereo_pipe(name="native_to_stereo_pipe", params={}):
'native_to_stereo_trans']),
name='outputnode')

## pad_stereo_T1
#pad_template_T1 = NodeParams(
#interface=niu.Function(
#input_names=["img_file", "pad_val"],
#output_names=["img_padded_file"],
#function=pad_zero_mri),
#params=parse_key(params, "pad_template_T1"),
#name="pad_template_T1")

#reg_pipe.connect(inputnode, 'stereo_T1',
#pad_template_T1, "img_file")

## outputnode
#reg_pipe.connect(pad_template_T1, 'img_padded_file',
#outputnode, "padded_stereo_T1")

if "pre_crop_z_T1" in params.keys():

print('pre_crop_z_T1')
Expand Down
4 changes: 3 additions & 1 deletion macapype/pipelines/rename.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ def rename_all_brain_derivatives(params, main_workflow, segment_pnh_pipe,
datasink, pref_deriv, parse_str,
space, ssoft, datatypes):

if "fast" in params or "N4debias" in params or "correct_bias_pipe" in params:
if ("fast" in params
or "N4debias" in params
or "correct_bias_pipe" in params):

# rename debiased_T1
rename_debiased_T1 = pe.Node(
Expand Down

0 comments on commit 473b36c

Please sign in to comment.