Skip to content

Commit

Permalink
Forgot os.listdir to traverse
Browse files Browse the repository at this point in the history
  • Loading branch information
spirosmaggioros committed Nov 1, 2024
1 parent 4c81a04 commit ceb092c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion NiChart_DLMUSE/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,8 @@ def get_bids_prefix(filename: str, folder: bool = False) -> str:
while char != checker:
prefix += char
idx += 1
if idx >= len(filename):
break
char = filename[idx]

return prefix
Expand Down Expand Up @@ -208,7 +210,7 @@ def merge_bids_output_data(out_data: str) -> None:
for split in os.listdir(out_data):
if get_bids_prefix(split, True) == "split":
s5_relabeled_dir = os.path.join(out_data, split, "temp_working_dir", "s5_relabeled")
for img in s5_relabeled_dir:
for img in os.listdir(s5_relabeled_dir):
os.system(f"mv {s5_relabeled_dir}/{img} {out_data}/{get_bids_prefix(img)}/anat/")

def split_data(in_dir: str, N: int) -> list:
Expand Down

0 comments on commit ceb092c

Please sign in to comment.