Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cubids/cubids.py
Original file line number Diff line number Diff line change
Expand Up @@ -1010,10 +1010,14 @@ def get_param_groups_from_entity_set(self, entity_set):
raise Exception("Fieldmaps must be cached to find parameter groups.")
key_entities = utils._entity_set_to_entities(entity_set)
key_entities["extension"] = ".nii[.gz]*"
# Account for plus signs in entity values
key_entities = {k: v.replace("+", "\\+") for k, v in key_entities.items() if v is not None}

matching_files = self.layout.get(
return_type="file", scope="self", regex_search=True, **key_entities
)
if not matching_files:
raise Exception(f"No files found for entity set: {key_entities}")

# ensure files who's entities contain key_entities but include other
# entities do not also get added to matching_files
Expand Down
Loading