Skip to content

Commit

Permalink
Update concatenation.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Nov 4, 2024
1 parent 4892f35 commit fb5a571
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions xcp_d/utils/concatenation.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# vi: set ft=python sts=4 ts=4 sw=4 et:
"""Functions for concatenating scans across runs."""

import os
from contextlib import suppress

import nibabel as nb
Expand Down Expand Up @@ -58,6 +59,4 @@ def concatenate_niimgs(files, out_file):
concat_preproc_img = concat_imgs(files)
concat_preproc_img.to_filename(out_file)
else:
import subprocess
cmd = ['wb_command', '-cifti-merge', out_file, '-cifti'] + files
subprocess.run(cmd, check=True)
os.system(f"wb_command -cifti-merge {out_file} -cifti {' -cifti '.join(files)}")

0 comments on commit fb5a571

Please sign in to comment.