Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add option to overwrite file (and write out extra files with "verbose") in T2smap workflow #1166

Merged
merged 2 commits into from
Jan 16, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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