From 342357bd0c71ccbfebe5aee8318bdc7f1b21a3a4 Mon Sep 17 00:00:00 2001 From: Christos Falas Date: Mon, 24 Feb 2025 16:12:04 +0000 Subject: [PATCH] remove eigh The original assumption that we can use eigh because the autocorrelation matrix is Hermitian is not true. Although the true autocorrelation matrix is Hermitian, this is not necessarily the case for the estimate we use. --- where_fi/processing/aoa.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/where_fi/processing/aoa.py b/where_fi/processing/aoa.py index a03bb0f..583bdd6 100644 --- a/where_fi/processing/aoa.py +++ b/where_fi/processing/aoa.py @@ -113,12 +113,11 @@ class AoA: def evaluate(self, theta: torch.Tensor, tof: torch.Tensor) -> torch.Tensor: R = torch.mean(self.historical_autocorr, dim=0) - assert (R == torch.conj(R).T).all() # The smallest eigenvectors span the noise subspace, # and the largest span the signal subspace. logger.debug(f"Calculating eigenvectors of R: {R.shape}") - eigvals, eigvecs = torch.linalg.eigh(R) + eigvals, eigvecs = torch.linalg.eig(R) assert isinstance(eigvals, torch.Tensor) assert isinstance(eigvecs, torch.Tensor) logger.info(f"Eigenvalues: {eigvals}")