Skip to content

Commit

Permalink
Improve exception
Browse files Browse the repository at this point in the history
Co-authored-by: Chris Markiewicz <[email protected]>
  • Loading branch information
psadil and effigies authored Oct 16, 2024
1 parent dd5f251 commit 9b40a9d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions sdcflows/utils/epimanip.py
Original file line number Diff line number Diff line change
Expand Up @@ -189,9 +189,8 @@ def get_trt(in_meta, in_file=None):

return trt
elif in_file is None:
msg = "Unable to find TotalReadoutTime in metadata and in_file \
not defined."
raise AssertionError(msg)
msg = "`in_file` must be defined if TotalReadoutTime does not appear in `in_meta`."
raise ValueError(msg)

# npe = N voxels PE direction
pe_index = "ijk".index(in_meta["PhaseEncodingDirection"][0])
Expand Down

0 comments on commit 9b40a9d

Please sign in to comment.