Skip to content

Commit 039382f

Browse files
committed
FIX: Set default t_code even if no t_zoom
1 parent cf126f3 commit 039382f

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

nibabel/nifti1.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1694,8 +1694,9 @@ def get_zooms(self, units=None, raise_unknown=False):
16941694
if xyz_code == 'unknown':
16951695
xyz_msg = 'Unknown spatial units'
16961696
xyz_code = 'mm'
1697-
if t_code == 'unknown' and t_zoom is not None:
1698-
t_msg = 'Unknown time units'
1697+
if t_code == 'unknown':
1698+
if t_zoom is not None:
1699+
t_msg = 'Unknown time units'
16991700
t_code = 'sec'
17001701
if raise_unknown and (xyz_msg, t_msg) != ('', ''):
17011702
if xyz_msg and t_msg:

0 commit comments

Comments
 (0)