Skip to content

Commit

Permalink
fix: remove buggy, uncovered lines
Browse files Browse the repository at this point in the history
Sometimes, one would set `EchoTime = 0.0` for the first phase map, and the deltaTE will exactly be the EchoTime of the other phase.

In such a situation, the error was raised.
In addition, the check was unnecessary because if one of the echoes or both are `None`, then an error is raised in line 36.
  • Loading branch information
oesteban authored Dec 11, 2020
1 parent 9b5c167 commit a36d91d
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions sdcflows/utils/phasemanip.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,6 @@ def subtract_phases(in_phases, in_meta, newpath=None):
from nipype.utils.filemanip import fname_presuffix

echo_times = tuple([m.pop("EchoTime", None) for m in in_meta])
if not all(echo_times):
raise ValueError(
"One or more missing EchoTime metadata parameter "
"associated to one or more phase map(s)."
)

if echo_times[0] > echo_times[1]:
in_phases = (in_phases[1], in_phases[0])
in_meta = (in_meta[1], in_meta[0])
Expand Down

0 comments on commit a36d91d

Please sign in to comment.