def test_position_seek_zero_overlap(self): shape = (30, 60) bsize = 10 seek = 5 res1, res2 = pavement(shape, bsize=bsize, seek=seek, overlap=0) assert_equal(res1, np.array((5, 15))) assert_equal(res2, np.array((5, 15, 25, 35, 45)))
def test_position_nonproportional_imgshape2(self): shape = (56, 34) res1, res2 = pavement(shape, bsize=8, seek=8, overlap=4) # Should stop at 56 - 2*8 = 40 assert_equal(res1, np.array((8, 12, 16, 20, 24, 28, 32, 36, 40)))
def test_position_zero_seek_overlap(self): shape = (20, 50) bsize = 10 res1, res2 = pavement(shape, bsize=bsize, seek=0, overlap=5) assert_equal(res1, np.array((0, 5, 10))) assert_equal(res2, np.array((0, 5, 10, 15, 20, 25, 30, 35, 40)))