Skip to content

Commit

Permalink
[FIX] Correct file correspondance issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Levitas committed May 8, 2024
1 parent 270e3f1 commit e7cb8ce
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions handler/ezBIDS_core/ezBIDS_core.py
Original file line number Diff line number Diff line change
Expand Up @@ -974,8 +974,10 @@ def generate_dataset_list(uploaded_files_list, exclude_data):

# Files (JSON, bval/bvec, tsv) associated with imaging file
corresponding_file_paths = [
x for x in corresponding_files_list if img_file.split(ext)[0] in x and not x.endswith(ext)
x for x in corresponding_files_list if f"{img_file.split(ext)[0]}." in x and not x.endswith(ext)
]
# corresponding_files_list
print(corresponding_file_paths)

# Find image file size
filesize = os.stat(img_file).st_size
Expand Down Expand Up @@ -2335,7 +2337,7 @@ def datatype_suffix_identification(dataset_list_unique_series, lookup_dic, confi
unique_dic["datatype"] = "pet"
unique_dic["suffix"] = "blood"
unique_dic["type"] = "pet/blood"
unique_dic["message"] = "Acquisition is believed to be pet/pet " \
unique_dic["message"] = "Acquisition is believed to be pet/blood " \
"because the file path ends with '_blood.json. " \
"Please modify if incorrect."

Expand Down

0 comments on commit e7cb8ce

Please sign in to comment.