示例#1
0
 def test_read_xrm_returns_properly_sliced_np_array_y_x_slice(self):
     image_data, metadata = reader.read_xrm(
         os.path.join(
             TEST_DIR,
             "test_data/test_chip00.xrm",
         ),
         ((0, 256), (384, 512), ),
     )
     self.assertEqual(
         image_data.shape,
         (256, 128, ),
     )
示例#2
0
 def test_read_xrm_returns_properly_sliced_np_array_x_slice(self):
     image_data, metadata = reader.read_xrm(
         os.path.join(
             TEST_DIR,
             "test_data/test_chip00.xrm",
         ),
         ((0, 256), ),
     )
     self.assertEqual(
         image_data.shape,
         (
             256,
             512,
         ),
     )
示例#3
0
 def test_read_xrm_reads_an_xrm_file(self):
     print(TEST_DIR)
     image_data, metadata = reader.read_xrm(
         os.path.join(TEST_DIR, "test_data/test_chip00.xrm"), [1, 2])
     np.testing.utils.assert_(image_data is not False)
     np.testing.utils.assert_(metadata is not False)
示例#4
0
 def test_read_xrm_gets_y_position(self):
     array_data, metadata = reader.read_xrm(
         os.path.join(TEST_DIR, "test_data/test_chip00.xrm"))
     self.assertEqual(metadata["y_positions"], [-3761.9892578125])
示例#5
0
 def test_read_xrm_gets_x_position(self):
     array_data, metadata = reader.read_xrm(
         os.path.join(TEST_DIR, "test_data/test_chip00.xrm"))
     self.assertEqual(metadata["x_positions"], [715.3599853515625])
示例#6
0
 def test_read_xrm_gets_theta(self):
     array_data, metadata = reader.read_xrm(
         os.path.join(TEST_DIR, "test_data/test_chip00.xrm"))
     self.assertEqual(metadata["thetas"], [-0.06000000238418579])
示例#7
0
 def test_read_xrm_reads_an_xrm_file(self):
     print(TEST_DIR)
     image_data, metadata = reader.read_xrm(
         os.path.join(TEST_DIR, "test_data/test_chip00.xrm"), [1, 2])
     np.testing.utils.assert_(image_data is not False)
     np.testing.utils.assert_(metadata is not False)
示例#8
0
 def test_read_xrm_gets_y_position(self):
     array_data, metadata = reader.read_xrm(
         os.path.join(TEST_DIR, "test_data/test_chip00.xrm"))
     self.assertEqual(metadata["y_positions"], [-3761.9892578125])
示例#9
0
 def test_read_xrm_gets_x_position(self):
     array_data, metadata = reader.read_xrm(
         os.path.join(TEST_DIR, "test_data/test_chip00.xrm"))
     self.assertEqual(metadata["x_positions"], [715.3599853515625])
示例#10
0
 def test_read_xrm_gets_theta(self):
     array_data, metadata = reader.read_xrm(
         os.path.join(TEST_DIR, "test_data/test_chip00.xrm"))
     self.assertEqual(metadata["thetas"], [-0.06000000238418579])