Skip to content

Commit c9cbaf3

Browse files
committed
only rename aslcontext if its an asl scan being renamed
1 parent 55673d1 commit c9cbaf3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

cubids/cubids.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -702,7 +702,8 @@ def change_filename(self, filepath, entities):
702702
self.new_filenames.append(new_physio)
703703

704704
# Update ASL-specific files
705-
if "/perf/" in filepath:
705+
# Only rename ASLContext and labeling files when the ASL time series is being renamed.
706+
if "/perf/" in filepath and old_suffix == "asl":
706707
old_context = filepath.replace(scan_end, "_aslcontext.tsv")
707708
if Path(old_context).exists():
708709
self.old_filenames.append(old_context)

0 commit comments

Comments
 (0)