We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7fe10e6 commit f1ec04cCopy full SHA for f1ec04c
nibabel/freesurfer/mghformat.py
@@ -277,11 +277,14 @@ def set_zooms(self, zooms):
277
if len(zooms) > ndims:
278
raise HeaderDataError('Expecting %d zoom values' % ndims)
279
if np.any(zooms[:3] <= 0):
280
- raise HeaderDataError('zooms[:3] must be positive')
+ raise HeaderDataError('Spatial (first three) zooms must be '
281
+ 'positive; got {!r}'
282
+ ''.format(tuple(zooms[:3])))
283
hdr['delta'] = zooms[:3]
284
if len(zooms) == 4:
285
if zooms[3] < 0:
- raise HeaderDataError('zooms[3] must be non-negative')
286
+ raise HeaderDataError('TR must be non-negative; got {!r}'
287
+ ''.format(zooms[3]))
288
hdr['tr'] = zooms[3]
289
290
def get_data_shape(self):
0 commit comments