Example #1
0
def test_affaux(expectedAffauxs):
    toFaux, frFaux = untiler.affaux(4)

    expectedTo, expectedFr = expectedAffauxs

    assert np.array_equal(toFaux, expectedTo)
    assert np.array_equal(frFaux, expectedFr)

    print("# OK - %s " % (inspect.stack()[0][3]))
Example #2
0
def test_affaux(expectedAffauxs):
    toFaux, frFaux = untiler.affaux(4)

    expectedTo, expectedFr = expectedAffauxs

    assert np.array_equal(toFaux, expectedTo)
    assert np.array_equal(frFaux, expectedFr)

    print("# OK - %s " % (inspect.stack()[0][3]))
Example #3
0
def test_upsampling():
    rShape = 2**int(np.random.rand() * 5 + 5)
    rUp = 2**int(np.random.rand() * 3 + 1)

    toFaux, frFaux = untiler.affaux(rUp)

    test = np.zeros((3, rShape, rShape))

    outputUp = untiler.upsample(test, rUp, frFaux, toFaux)

    assert outputUp.shape == (3, rUp * rShape, rUp * rShape)

    print("# OK - %s " % (inspect.stack()[0][3]))
Example #4
0
def test_upsampling():
    rShape = 2 ** int(np.random.rand() * 5 + 5)
    rUp = 2 ** int(np.random.rand() * 3 + 1)

    toFaux, frFaux = untiler.affaux(rUp)

    test = np.zeros((3, rShape, rShape))

    with rasterio.drivers():
        outputUp = untiler.upsample(test, rUp, frFaux, toFaux)

    assert outputUp.shape == (3, rUp * rShape, rUp * rShape)

    print("# OK - %s " % (inspect.stack()[0][3]))