コード例 #1
0
 def testToMatlab(self):
     dfts = []
     dfts.append(([[4, 0, 1, 0]], [[2, 1, 0, 0]]))
     dfts.append(([[1, 0, 0, 1]], [[0, 1, 1, 0]]))
     dft_arr = mat.to_matlab_format(dfts)
     chan1 = np.array([4, 1j, 1, 0, 2, 0, 1, -1j], dtype=np.complex64)
     chan2 = np.array([1, 1j, 1j, 1, 0, 1, -1j, -1j], dtype=np.complex64)
     print dft_arr
     self.assertListFloatEqual(chan1, dft_arr[0, :])
     self.assertListFloatEqual(chan2, dft_arr[1, :])
コード例 #2
0
 def testToMatlab(self):
     dfts = []
     dfts.append(([[4, 0, 1, 0]], [[2, 1, 0, 0]]))
     dfts.append(([[1, 0, 0, 1]], [[0, 1, 1, 0]]))
     dft_arr = mat.to_matlab_format(dfts)
     chan1 = np.array([4, 1j, 1, 0, 2, 0, 1, -1j], dtype=np.complex64)
     chan2 = np.array([1, 1j, 1j, 1, 0, 1, -1j, -1j], dtype=np.complex64)
     print dft_arr
     self.assertListFloatEqual(chan1, dft_arr[0, :])
     self.assertListFloatEqual(chan2, dft_arr[1, :])
コード例 #3
0
 def get_3d_distribution(self, dfts):
     """
     Get distribution of source direction across 3d search space
     """
     ffts = mat.to_matlab_format(dfts)
     return self.get_distribution_mat(ffts)
コード例 #4
0
 def get_direction(self, dfts):
     ffts = mat.to_matlab_format(dfts)
     # print "ffts: " + str(ffts)
     return self.get_direction_np(ffts)
コード例 #5
0
 def get_direction(self, dfts):
     ffts = mat.to_matlab_format(dfts)
     #print "ffts: " + str(ffts)
     return self.get_direction_np(ffts)
コード例 #6
0
 def get_3d_distribution(self, dfts):
     """
     Get distribution of source direction across 3d search space
     """
     ffts = mat.to_matlab_format(dfts)
     return self.get_distribution_mat(ffts)