Skip to content

Commit 24f0e41

Browse files
committed
Fixes the new ray tracing cpp function after merge.
1 parent 89aa098 commit 24f0e41

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

pyroomacoustics/directivities/base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def sample_rays(self, n_rays, rng=None):
110110
111111
Returns
112112
-------
113-
ray_directions: numpy.ndarray, shape (n_dim, n_rays)
113+
ray_directions: numpy.ndarray, shape (n_rays, n_dim)
114114
An array containing the unit vectors in its columns
115115
energies: numpy.ndarray, shape (n_rays, n_bands)
116116
An energy carried per ray so that the expectation over all the rays

pyroomacoustics/libroom_src/room.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ void Room<D>::ray_tracing(
953953
const Eigen::Matrix<float, Eigen::Dynamic, D> &unit_vectors,
954954
const Eigen::Matrix<float, Eigen::Dynamic, Eigen::Dynamic> &energies,
955955
const Vectorf<D> &source_pos) {
956-
float energy_0 = 2.f / unit_vectors.rows();
956+
float energy_0 = energy_0_numerator / unit_vectors.rows();
957957

958958
if (unit_vectors.rows() != energies.rows()) {
959959
throw std::runtime_error("Error: The same number of rays and energies is expected.");

0 commit comments

Comments
 (0)