@@ -31,11 +31,11 @@ class TestEcatHeader(TestCase):
31
31
example_file = ecat_file
32
32
33
33
def test_header_size (self ):
34
- assert_equal (self .header_class ._dtype .itemsize , 502 )
34
+ assert_equal (self .header_class ._dtype .itemsize , 512 )
35
35
36
36
def test_empty (self ):
37
37
hdr = self .header_class ()
38
- assert_true (len (hdr .binaryblock ) == 502 )
38
+ assert_true (len (hdr .binaryblock ) == 512 )
39
39
assert_true (hdr ['magic_number' ] == asbytes ('MATRIX72' ))
40
40
assert_true (hdr ['sw_version' ] == 74 )
41
41
assert_true (hdr ['num_frames' ] == 0 )
@@ -163,7 +163,7 @@ class TestEcatSubHeader(TestCase):
163
163
subhdr = subhdr_class (hdr , mlist , fid )
164
164
165
165
def test_subheader_size (self ):
166
- assert_equal (self .subhdr_class ._subhdrdtype .itemsize , 242 )
166
+ assert_equal (self .subhdr_class ._subhdrdtype .itemsize , 510 )
167
167
168
168
def test_subheader (self ):
169
169
assert_equal (self .subhdr .get_shape () , (10 ,10 ,3 ))
@@ -176,17 +176,13 @@ def test_subheader(self):
176
176
assert_equal (self .subhdr .get_zooms ()[0 ], 2.20241978764534 )
177
177
assert_equal (self .subhdr .get_zooms ()[2 ], 3.125 )
178
178
assert_equal (self .subhdr ._get_data_dtype (0 ),np .uint16 )
179
- assert_equal (self .subhdr ._get_frame_offset (), 1536 )
179
+ assert_equal (self .subhdr ._get_frame_offset (), 1024 )
180
180
dat = self .subhdr .raw_data_from_fileobj ()
181
181
assert_equal (dat .shape , self .subhdr .get_shape ())
182
182
scale_factor = self .subhdr .subheaders [0 ]['scale_factor' ]
183
183
assert_equal (self .subhdr .subheaders [0 ]['scale_factor' ].item (),1.0 )
184
184
ecat_calib_factor = self .hdr ['ecat_calibration_factor' ]
185
185
assert_equal (ecat_calib_factor , 25007614.0 )
186
- scaled_dat = self .subhdr .data_from_fileobj ()
187
- tmpdat = scale_factor * ecat_calib_factor * dat
188
- assert_array_equal (tmpdat , scaled_dat )
189
-
190
186
191
187
class TestEcatImage (TestCase ):
192
188
image_class = EcatImage
0 commit comments