Example #1
0
    def testCorrelate2D(self):
        print 'test correlate2'
        da = np.zeros([8,8], np.float)
        da[3,3] = 20
        db = da.copy()
        ada = sig.correlate(da,db)
        print ada

        da += rnd.poisson(2, size=da.shape)
        db = np.zeros([8,8], np.float)
        db[5,6] = 20
        db += rnd.poisson(2, size=db.shape)
        ada = sig.correlate(da,db)
        print ada
Example #2
0
    def testCorrelate2(self):
        print 'test correlate2'
        da = np.zeros([10], np.float)
        da[3] = 1
        db = da.copy()
        ada = sig.correlate(da,db)
        self.checkitems(None, ada)

        db = np.zeros([10], np.float)
        db[5] = 1
        ada = sig.correlate(da,db)
        self.checkitems(None, ada)

        ada = sig.phasecorrelate(da,db)
        self.checkitems(None, ada)
Example #3
0
 def testCorrelate(self):
     print 'test correlate'
     da = np.array(self.da, np.float)
     ada = sig.correlate(da, axes=[0])
     self.checkitems(None, ada)