Skip to content

Commit

Permalink
Add option to overwrite file (and write out extra files with "verbose…
Browse files Browse the repository at this point in the history
…") in T2smap workflow (#1166)
  • Loading branch information
smoia authored Jan 16, 2025
1 parent f84cbbc commit 213eead
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 1 deletion.
24 changes: 24 additions & 0 deletions tedana/workflows/t2smap.py
Original file line number Diff line number Diff line change
Expand Up @@ -152,6 +152,21 @@ def _get_parser():
optional.add_argument(
"--quiet", dest="quiet", help=argparse.SUPPRESS, action="store_true", default=False
)
optional.add_argument(
"--verbose",
dest="verbose",
action="store_true",
help="Generate intermediate and additional files.",
default=False,
)
optional.add_argument(
"--overwrite",
"-f",
dest="overwrite",
action="store_true",
help="Force overwriting of files.",
default=False,
)
parser._action_groups.append(optional)
return parser

Expand All @@ -168,7 +183,9 @@ def t2smap_workflow(
fitmode="all",
combmode="t2s",
debug=False,
verbose=False,
quiet=False,
overwrite=False,
t2smap_command=None,
):
"""
Expand Down Expand Up @@ -205,6 +222,11 @@ def t2smap_workflow(
Combination scheme for TEs: 't2s' (Posse 1999, default), 'paid' (Poser).
t2smap_command : :obj:`str`, optional
The command used to run t2smap. Default is None.
verbose : :obj:`bool`, optional
Generate intermediate and additional files. Default is False.
overwrite : :obj:`bool`, optional
If True, force overwriting of files. Default is False.
Other Parameters
----------------
Expand Down Expand Up @@ -284,6 +306,8 @@ def t2smap_workflow(
prefix=prefix,
config="auto",
make_figures=False,
overwrite=overwrite,
verbose=verbose,
)
n_echos = data_cat.shape[1]
LGR.debug(f"Resulting data shape: {data_cat.shape}")
Expand Down
2 changes: 1 addition & 1 deletion tedana/workflows/tedana.py
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,7 @@ def _get_parser():
optional.add_argument(
"--quiet", dest="quiet", help=argparse.SUPPRESS, action="store_true", default=False
)
parser.add_argument(
optional.add_argument(
"--overwrite",
"-f",
dest="overwrite",
Expand Down

0 comments on commit 213eead

Please sign in to comment.