Skip to content

Commit

Permalink
Updated comments
Browse files Browse the repository at this point in the history
  • Loading branch information
po09i committed Nov 12, 2020
1 parent bde0b81 commit 6baf725
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions shimmingtoolbox/unwrap/prelude.py
Original file line number Diff line number Diff line change
Expand Up @@ -81,8 +81,9 @@ def prelude(wrapped_phase, mag, affine, mask=None, threshold=None, is_unwrapping

fname_phase_unwrapped = glob.glob(os.path.join(path_tmp, 'rawPhase_unwrapped*'))[0]

# When loading fname_phase_unwrapped, if a singleton is on the last dimension, it will not appear in the last
# dimension in phase_unwrapped. To be consistent with the size of the input, the singleton are added back.
# When loading fname_phase_unwrapped, if a singleton is on the last dimension in wrapped_phase, it will not appear
# in the last dimension in phase_unwrapped. To be consistent with the size of the input, the singletons are added
# back.
phase_unwrapped = nib.load(fname_phase_unwrapped).get_fdata()
for _ in range(wrapped_phase.ndim - phase_unwrapped.ndim):
phase_unwrapped = np.expand_dims(phase_unwrapped, -1)
Expand Down

0 comments on commit 6baf725

Please sign in to comment.