def testCrosscorrelateLag100(self): """Test case with lag within the length of the input array """ int, int_, norm, = analysis.crosscorrelate(self.spk0, self.spk1, lag=100.0) matlab_int = numpy.loadtxt(self.p + '/analysis/crosscorrelate/out_matlab_int_lag_100') numpy.testing.assert_array_almost_equal(int, matlab_int, decimal = 3)
def testCrosscorrelateLag500(self): """Test case with lag is higher than the trial length """ int, int_, norm = analysis.crosscorrelate(self.spk0, self.spk1, lag=500.0) matlab_int = numpy.loadtxt(self.p + '/analysis/crosscorrelate/out_matlab_int_lag_500') numpy.testing.assert_array_almost_equal(int, matlab_int, decimal = 3)
def testCrosscorrelateNoLag(self): int, int_, norm = analysis.crosscorrelate(self.spk0, self.spk1) #The following are output was generated with the FIND MATLAB toolbox matlab_int = numpy.loadtxt(self.p + '/analysis/crosscorrelate/out_matlab_int') numpy.testing.assert_array_almost_equal(int, matlab_int, decimal=3)