def test_full_tensor(self): """ Tests full signal results. """ min_signal = self._mins[0] min_diffusivity = self._mins[1] full_signals = np.load("signal_full.npy") expected_eigs = np.load("expected_full.npy") result = tensor_fit(self._ols, self._design, full_signals, min_signal, min_diffusivity) result_eigs = np.array([np.sort(arr[0]) for arr in result]) self.assertTrue(np.allclose(expected_eigs, result_eigs))
def test_tensor_fit(self): """ tests tensor fit function. """ min_signal = self._mins[0] min_diffusivity = self._mins[1] result = tensor_fit(self._ols, self._design, self._signals, min_signal, min_diffusivity) expected_eigs = np.array([np.sort(arr[0]) for arr in self._expected]) result_eigs = np.array([np.sort(arr[0]) for arr in result]) self.assertTrue(np.allclose(expected_eigs, result_eigs))