MCPcopy
hub / github.com/LCAV/pyroomacoustics / response

Method response

pyroomacoustics/beamforming.py:732–750  ·  view source on GitHub ↗
(self, phi_list, frequency)

Source from the content-addressed store, hash-verified

730 return phase
731
732 def response(self, phi_list, frequency):
733 i_freq = np.argmin(np.abs(self.frequencies - frequency))
734
735 if self.weights is None and self.filters is not None:
736 self.weights_from_filters()
737 elif self.weights is None and self.filters is None:
738 raise NameError(
739 "Beamforming weights or filters need to be computed" " first."
740 )
741
742 # For the moment assume that we are in 2D
743 bfresp = np.dot(
744 H(self.weights[:, i_freq]),
745 self.steering_vector_2D(
746 self.frequencies[i_freq], phi_list, constants.get("ffdist")
747 ),
748 )
749
750 return self.frequencies[i_freq], bfresp
751
752 def response_from_point(self, x, frequency):
753 i_freq = np.argmin(np.abs(self.frequencies - frequency))

Callers 1

plotMethod · 0.80

Calls 4

weights_from_filtersMethod · 0.95
steering_vector_2DMethod · 0.95
HFunction · 0.85
getMethod · 0.80

Tested by

no test coverage detected