コード例 #1
0
    def test_run(self):

        # tests the run method which combines fit and transform

        random.seed(42)
        ref = random.randn(25, 25)

        im = shift(ref, [2, 0], mode='constant', order=0)
        imIn = ImagesLoader(self.sc).fromArrays(im)

        reg = Registration('crosscorr')
        reg.prepare(ref)
        model = reg.fit(imIn)
        out1 = model.transform(imIn).first()[1]
        out2 = reg.run(imIn).first()[1]

        assert_true(allclose(out1, out2))