def threshold_cube_0(self): cube = cb.threshold_cube(self.l2, value=-9.0) self.assertEqual(cube[0, 0, 0], -9.0) # -1.0 self.assertEqual(cube[0, 0, 1], -9.0) # -0.5 self.assertEqual(cube[0, 0, 2], -9.0) # 0.0 self.assertEqual(cube[0, 0, 3], self.l2[0, 0, 3]) # 0.5
def threshold_cube_1(self): cube = cb.threshold_cube(self.l0, 1.0, value=-9.0) self.assertEqual(cube[0, 0, 0], -9.0) # 0.5 self.assertEqual(cube[0, 0, 1], self.l0[0, 0, 1]) # 2.0