Skip to content

Commit

Permalink
Merge pull request #81 from oesteban/fix/80
Browse files Browse the repository at this point in the history
[FIX] Fieldmaps - make magnitude2 optional
  • Loading branch information
chrisgorgo committed Oct 27, 2017
2 parents e106dca + 448e926 commit ccd4d7a
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions bids/grabbids/bids_layout.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,9 +143,11 @@ def _get_fieldmaps(self, path):
cur_fieldmap = {"phasediff": file.filename,
"magnitude1": file.filename.replace(
"phasediff", "magnitude1"),
"magnitude2": file.filename.replace(
"phasediff", "magnitude2"),
"type": "phasediff"}
magnitude2 = file.filename.replace(
"phasediff", "magnitude2")
if os.path.isfile(magnitude2):
cur_fieldmap['magnitude2'] = magnitude2
elif file.type == "phase1":
cur_fieldmap["phase1"] = file.filename
cur_fieldmap["magnitude1"] = \
Expand Down

0 comments on commit ccd4d7a

Please sign in to comment.