Skip to content

Commit 4e84f11

Browse files
committed
changed suffix to file_suffix
1 parent cecaf80 commit 4e84f11

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

pydra/tasks/dcm2niix/utils.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,22 +5,22 @@
55
from pydra.engine.specs import ShellSpec, ShellOutSpec, File, Directory, SpecInfo
66

77

8-
def out_file_path(out_dir, filename, suffix, ext):
8+
def out_file_path(out_dir, filename, file_suffix, ext):
99
"""Attempting to handle the different suffixes that are appended to filenames
1010
created by Dcm2niix (see https://github.com/rordenlab/dcm2niix/blob/master/FILENAMING.md)
1111
"""
1212

1313
fpath = Path(out_dir) / filename
14-
fpath = fpath.with_suffix((suffix if suffix else "") + ext).absolute()
14+
fpath = fpath.with_suffix((file_suffix if file_suffix else "") + ext).absolute()
1515

1616
# Check to see if multiple echos exist in the DICOM dataset
1717
if not fpath.exists():
18-
if suffix is not None: # NB: doesn't match attrs.NOTHING
18+
if file_suffix is not None: # NB: doesn't match attrs.NOTHING
1919
neighbours = [
2020
str(p) for p in fpath.parent.iterdir() if p.name.endswith(ext)
2121
]
2222
raise ValueError(
23-
f"\nDid not find expected file '{fpath}' (suffix={suffix}) "
23+
f"\nDid not find expected file '{fpath}' (file_suffix={file_suffix}) "
2424
"after DICOM -> NIfTI conversion, please see "
2525
"https://github.com/rordenlab/dcm2niix/blob/master/FILENAMING.md for the "
2626
"list of suffixes that dcm2niix produces and provide an appropriate "
@@ -88,7 +88,7 @@ def dcm2niix_out_files(out_dir, filename):
8888
{"argstr": "-f '{filename}'", "help_string": "The output name for the file"},
8989
),
9090
(
91-
"suffix",
91+
"file_suffix",
9292
str,
9393
{
9494
"help_string": (

0 commit comments

Comments
 (0)