Skip to content

Commit

Permalink
Adds test for NormMUSIC
Browse files Browse the repository at this point in the history
  • Loading branch information
fakufaku committed Nov 29, 2021
1 parent d1e78a6 commit 04ec663
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions pyroomacoustics/doa/tests/test_doa.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@
import unittest

import numpy as np
from scipy.signal import fftconvolve

import pyroomacoustics as pra
from scipy.signal import fftconvolve

# fix the RNG seed for repeatability
np.random.seed(0)
Expand Down Expand Up @@ -47,6 +46,12 @@ def test_music(self):
print("distance:", pra.doa.circ_dist(azimuth, doa.azimuth_recon))
self.assertTrue(pra.doa.circ_dist(azimuth, doa.azimuth_recon) < tol)

def test_normmusic(self):
doa = pra.doa.algorithms["NormMUSIC"](R, fs, nfft, c=c)
doa.locate_sources(X, freq_bins=freq_bins)
print("distance:", pra.doa.circ_dist(azimuth, doa.azimuth_recon))
self.assertTrue(pra.doa.circ_dist(azimuth, doa.azimuth_recon) < tol)

def test_srp_phat(self):
doa = pra.doa.algorithms["SRP"](R, fs, nfft, c=c)
doa.locate_sources(X, freq_bins=freq_bins)
Expand Down

0 comments on commit 04ec663

Please sign in to comment.