From 9a363495b47e8c52cc960886b8da4a57ef3209a3 Mon Sep 17 00:00:00 2001 From: Paul McCarthy <pauld.mccarthy@gmail.com> Date: Wed, 8 Mar 2017 13:17:29 +0000 Subject: [PATCH] Fix to last commit --- fsl/data/image.py | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/fsl/data/image.py b/fsl/data/image.py index 934bde5ec..46c860a2d 100644 --- a/fsl/data/image.py +++ b/fsl/data/image.py @@ -321,19 +321,19 @@ class Nifti(notifier.Notifier): # but we want the NIFTI codes. So we use # the (undocumented) nifti1.unit_codes field # to convert back to the raw codes. - xyzUnits = self.header.get_xyzt_units()[0] - xyzUnits = nib.nifti1.unit_codes[xyzUnits] - - return xyzUnits + units = self.header.get_xyzt_units()[0] + units = nib.nifti1.unit_codes[units] + return units + @property def timeUnits(self): """Returns the NIFTI time dimension unit code. """ # See xyzUnits - timeUnits = self.header.get_xyzt_units()[1] - timeUnits = nib.nifti1.unit_codes[timeUnits] - return timeUnits + units = self.header.get_xyzt_units()[1] + units = nib.nifti1.unit_codes[units] + return units @property -- GitLab