Skip to content

Commit

Permalink
Allow executive summary registration figure to really be empty (PennL…
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo authored Oct 31, 2023
1 parent f38dae2 commit 959d210
Showing 1 changed file with 7 additions and 6 deletions.
13 changes: 7 additions & 6 deletions xcp_d/workflows/execsummary.py
Original file line number Diff line number Diff line change
Expand Up @@ -378,20 +378,21 @@ def init_execsummary_functional_plots_wf(
else:
bb_register_prefix = current_bold_file.split("_desc")[0]

# TODO: Switch to interface
bold_t1w_registration_files = layout.get(
desc=["bbregister", "coreg", "bbr", "flirtbbr"],
desc=["bbregister", "coreg", "bbr", "flirtbbr", "flirtnobbr"],
extension=".svg",
suffix="bold",
return_type="file",
)
bold_t1w_registration_files = fnmatch.filter(
bold_t1w_registration_files,
f"*/{bb_register_prefix}*",
)
if not bold_t1w_registration_files:
LOGGER.warning("No coregistration figure found in preprocessing derivatives.")
else:
# TODO: Switch to interface
bold_t1w_registration_file = fnmatch.filter(
bold_t1w_registration_files,
f"*/{bb_register_prefix}*",
)[0]
bold_t1w_registration_file = bold_t1w_registration_files[0]

ds_registration_figure = pe.Node(
DerivativesDataSink(
Expand Down

0 comments on commit 959d210

Please sign in to comment.