@@ -72,7 +72,7 @@ def test_read_mgh():
7272 assert_equal (h ['dof' ], 0 )
7373 assert_equal (h ['goodRASFlag' ], 1 )
7474 assert_array_equal (h ['dims' ], [3 , 4 , 5 , 2 ])
75- assert_almost_equal (h ['tr' ], 2 )
75+ assert_almost_equal (h ['tr' ], 2.0 )
7676 assert_almost_equal (h ['flip_angle' ], 0.0 )
7777 assert_almost_equal (h ['te' ], 0.0 )
7878 assert_almost_equal (h ['ti' ], 0.0 )
@@ -150,9 +150,14 @@ def test_write_noaffine_mgh():
150150def test_set_zooms ():
151151 mgz = load (MGZ_FNAME )
152152 h = mgz .header
153- assert_array_almost_equal (h .get_zooms (), [1 , 1 , 1 , 0.002 ])
154- h .set_zooms ([1 , 1 , 1 , 3 ])
155- assert_array_almost_equal (h .get_zooms (), [1 , 1 , 1 , 3 ])
153+ assert_array_almost_equal (h .get_zooms (units = 'raw' ), [1 , 1 , 1 , 2 ])
154+ assert_array_almost_equal (h .get_zooms (units = 'norm' ), [1 , 1 , 1 , 0.002 ])
155+ h .set_zooms ([1 , 1 , 1 , 3 ], units = 'raw' )
156+ assert_array_almost_equal (h .get_zooms (units = 'raw' ), [1 , 1 , 1 , 3 ])
157+ assert_array_almost_equal (h .get_zooms (units = 'norm' ), [1 , 1 , 1 , 0.003 ])
158+ h .set_zooms ([1 , 1 , 1 , 3 ], units = 'norm' )
159+ assert_array_almost_equal (h .get_zooms (units = 'raw' ), [1 , 1 , 1 , 3000 ])
160+ assert_array_almost_equal (h .get_zooms (units = 'norm' ), [1 , 1 , 1 , 3 ])
156161 for zooms in ((- 1 , 1 , 1 , 1 ),
157162 (1 , - 1 , 1 , 1 ),
158163 (1 , 1 , - 1 , 1 ),
0 commit comments