Skip to content

Commit b32e242

Browse files
committed
perf(perf): only rename aslcontext/labeling when renaming ASL time series
1 parent aaccd9b commit b32e242

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

cubids/cubids.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,8 +683,8 @@ def change_filename(self, filepath, entities):
683683
new_physio = new_path.replace(new_scan_end, "_physio.tsv.gz")
684684
self.new_filenames.append(new_physio)
685685

686-
# Update ASL-specific files
687-
if "/perf/" in filepath:
686+
# Update ASL-specific files only when ASL timeseries is being renamed
687+
if "/perf/" in filepath and old_suffix == "asl":
688688
old_context = filepath.replace(scan_end, "_aslcontext.tsv")
689689
if Path(old_context).exists():
690690
self.old_filenames.append(old_context)

0 commit comments

Comments
 (0)