Skip to content

Commit

Permalink
Fix false positive matches from other parts in the BIDS filename (e.g…
Browse files Browse the repository at this point in the history
…. files named `sub-01-acq-fieldmap_magnitude1.nii.gz` (see github issue nipreps#264)
  • Loading branch information
marcelzwiers committed Apr 16, 2024
1 parent 73d717a commit a0ca25a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions sdcflows/fieldmaps.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,9 +340,9 @@ def __attrs_post_init__(self):
try:
new_path = (
sources[0].parent / sources[0].name
.replace("fieldmap", "magnitude")
.replace("diff", "1")
.replace("phase", "magnitude")
.replace("_fieldmap", "_magnitude")
.replace("_phasediff", "_phase1")
.replace("_phase", "_magnitude")
)
self.sources.append(FieldmapFile(new_path))
except Exception:
Expand Down

0 comments on commit a0ca25a

Please sign in to comment.