Skip to content

Commit

Permalink
Update utils.py
Browse files Browse the repository at this point in the history
  • Loading branch information
tsalo committed Feb 24, 2025
1 parent 7868e55 commit b703d13
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cubids/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,10 @@ def _file_to_entity_set(filename):
Field maps will have an extraneous "fmap" entity.
>>> _file_to_entity_set("sub-01_ses-01_dir-AP_epi.nii.gz")
'direction-AP_fmap-epi_session-01_suffix-epi'
Plus signs are supported.
>>> _file_to_entity_set("sub-01_ses-01_acq-VARIANT+EchoTimeC1_epi.nii.gz")
'acquisition-VARIANT+EchoTimeC1_session-01_suffix-epi'
"""
entities = parse_file_entities(str(filename))
return _entities_to_entity_set(entities)
Expand Down

0 comments on commit b703d13

Please sign in to comment.