Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support for recorded source/mic directivities from DIRPAT database (#259) #302

Merged
merged 66 commits into from
Oct 29, 2024
Merged
Changes from 1 commit
Commits
Show all changes
66 commits
Select commit Hold shift + click to select a range
54ac420
Support for recorded source/mic directivities from DIRPAT database (#…
prerak23 Feb 2, 2023
63d13f8
merge with master
fakufaku Feb 6, 2023
4274ec2
remove deprecated np.float type alias from numpy. run black
fakufaku Feb 6, 2023
8853437
isort
fakufaku Feb 6, 2023
02af651
isort
fakufaku Feb 8, 2023
76f8b96
Adds download functions for the SOFA files from DIRPAT. Adds tests fo…
fakufaku Feb 9, 2023
88e1c5b
Adds workaround to CI for windows and py3.7
fakufaku Feb 9, 2023
a2e1080
Changes the EM32 sofa file url to official url
fakufaku Feb 10, 2023
2c04a8c
open_sofa_interpolate.py: vectorizes fibonnaci computations, use sphe…
fakufaku Feb 13, 2023
910e5b5
Fixes the weights in the weighted pseudo-inverse used in the interpol…
fakufaku Feb 13, 2023
1a45b7c
Moves SOFA open function out of the DIRPATInterpolate class.
fakufaku Feb 14, 2023
70a562e
Separates the spherical interpolation from the DIRPAT and SOFA classe…
fakufaku Feb 14, 2023
b662934
Merge branch 'master' into dev/dirpat
fakufaku Feb 14, 2023
683b498
Vectorizes the spherical harmonics computation function for spherical…
fakufaku Feb 14, 2023
7507118
Moves the regular grid detection function to doa.utils
fakufaku Feb 14, 2023
9f91a55
Changes the DIRPAT terminology to something more general to support m…
fakufaku Feb 15, 2023
079bb1e
black/isort
fakufaku Feb 15, 2023
5958ce0
black/sort
fakufaku Feb 15, 2023
b6ff1cb
Adds support sofe simple hrir sofa files
fakufaku Jun 3, 2023
f558bfc
Adds two SOFA files for MIT Kemar HRTF. Adds an example script for bi…
fakufaku Jun 3, 2023
f76ca8f
merge master
fakufaku Jun 5, 2023
bdb8309
Modularize the RIR building routines for ISM and RT
fakufaku Jun 10, 2023
32269ae
Fixing tests for sofa files
fakufaku Jun 12, 2023
92e4007
Adds simulation sub-package in list in setup.py
fakufaku Jun 12, 2023
9b38cca
Adds init file for simulation sub-package
fakufaku Jun 12, 2023
88a9c54
fix sofa test
fakufaku Jun 12, 2023
4922a0e
ray tracing: adds air absorption, linear interpolation of histogram
fakufaku Jun 14, 2023
5ffe18c
Fixes issue when histogram is all zeros
fakufaku Jun 14, 2023
0ab2ad9
Switch to using the origin pyroomacoustics fibonacci spherical grid f…
fakufaku Jun 16, 2023
46e30d1
moves is_dirpat check inside the open sofa file function
fakufaku Jul 4, 2023
b0d2b1d
modularize the element location parsing routine for sofa files
fakufaku Sep 29, 2023
b4abb9b
adds sofa database as attrdict
fakufaku Apr 23, 2024
3984eaa
black
fakufaku May 7, 2024
20e4106
merge master
fakufaku May 7, 2024
1c1ddc9
Improved SOFA api
fakufaku May 25, 2024
cf6802e
example
fakufaku May 25, 2024
0edebfb
Fixes the SOFA tests. Due to change of sampling algorithm (scipy.sign…
fakufaku May 25, 2024
bc016ad
lint
fakufaku May 26, 2024
e96f4ee
merge
fakufaku May 26, 2024
b6aa302
relocates the from directivities to simulation/ism
fakufaku May 26, 2024
9fb7ba7
fixes source_angle_shoebox test
fakufaku May 26, 2024
7874a01
refactors directivities sub-module and sofa sub-module into a single …
fakufaku May 26, 2024
ccacfed
fixes sofa db to include files that are present, but not in the json …
fakufaku May 26, 2024
65107c4
SOFA measurement labels are read from the database when available. Ma…
fakufaku May 26, 2024
26f4a32
removes unnecessary imports and lint
fakufaku May 26, 2024
b1a0357
Merge branch 'master' into dev/dirpat
fakufaku May 26, 2024
120ac43
CHANGELOG formatting for branch
fakufaku May 26, 2024
1d09fb8
merge
fakufaku May 27, 2024
f866eb8
Fixes the cardioid family formula in the corresponding object. Adds a…
fakufaku May 27, 2024
b3917a0
lint
fakufaku May 27, 2024
d8d79ea
changes the interface for cardioid family. Removes the enum, uses sep…
fakufaku May 27, 2024
d392bb6
lint
fakufaku May 27, 2024
d48a899
Changes the KDTree in MeasuredDirectivity from operating on spherical…
fakufaku May 27, 2024
e845041
Adds directivities (analytic and measured) to the documentation.
fakufaku May 28, 2024
f89e815
adds soxr to requirements for doc building
fakufaku May 28, 2024
8d24c10
Doc
fakufaku May 28, 2024
d7371a8
Disallow directivities for 2D rooms.
fakufaku May 28, 2024
5e1334f
Fixes directivities examples
fakufaku May 28, 2024
200e875
lint
fakufaku May 28, 2024
b6d9a6c
Fixes some docstrings
fakufaku May 28, 2024
c4c9e27
Reflecting Prerak's review (PR #302).
fakufaku Oct 27, 2024
0fd67c4
Merge with master
fakufaku Oct 27, 2024
6f5f88e
Re-fixes issue #353 in the dirpat branch.
fakufaku Oct 27, 2024
5fa9c3b
lint
fakufaku Oct 27, 2024
2c48ac2
Fixes build for win and py 3.8.
fakufaku Oct 28, 2024
325b856
Edits CHANGELOG. Adds more details about the SOFA files included incl…
fakufaku Oct 28, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
merge master
fakufaku committed May 7, 2024
commit 20e4106bd306f5825c85dbc6403832d93bc4ec1f
43 changes: 27 additions & 16 deletions CHANGELOG.rst
Original file line number Diff line number Diff line change
@@ -11,24 +11,9 @@ adheres to `Semantic Versioning <http://semver.org/spec/v2.0.0.html>`_.
`Unreleased`_
-------------

Nothing yet

`0.7.4`_ - 2024-04-25
---------------------

Added
~~~~~

- Simulation with measured directivity responses in SOFA format (limited file types) is
possible with the image source model.
- New implementation of fast RIR builder function in the ``libroom`` C++
extension to replace the current cython code. Advantages are: 1) only one
compiled extension, 2) multithreading support
- New global parameter ``sinc_lut_granularity`` that controls the number of points used
in the look-up table for the sinc interpolation. Accessible via ``parameters.constants.get``.
- New global parameter ``num_threads`` that controls the number of threads used in
multi-threaded code (rir builder only at the moment). The number of threads can also
be controlled via the environement variable ``PRA_NUM_THREADS``
- New global parameters to control the octave bands used for simulation.
* ``octave_bands_base_freq``: the base frequency used for the octave bands (default ``125 ``),
note that together with the sampling frequency this will determine the number of sub-bands
@@ -42,10 +27,36 @@ Added
Changed
~~~~~~~

- Removed the broken ``get_rir`` method of the class ``SoundSource``
- In ray tracing, the histograms are now linearly interpolated between
the bins to obtain smoother RIR

`0.7.4`_ - 2024-04-25
---------------------

Added
~~~~~

- Simulation with measured directivity responses in SOFA format (limited file types) is
possible with the image source model.
- New implementation of fast RIR builder function in the ``libroom`` C++
extension to replace the current cython code. Advantages are: 1) only one
compiled extension, 2) multithreading support
- New global parameter ``sinc_lut_granularity`` that controls the number of
points used in the look-up table for the sinc interpolation. Accessible via
``parameters.constants.get``.
- New global parameter ``num_threads`` that controls the number of threads
used in multi-threaded code (rir builder only at the moment). The number of
threads can also be controlled via the environement variable
``PRA_NUM_THREADS``
- Adds package build support for Python 3.11 and 3.12. - Adds package build for
new Apple M1 architecture

Changed
~~~~~~~

- Removed the broken ``get_rir`` method of the class ``SoundSource``
- Removes package build support for Python 3.7 (EOL)

Bugfix
~~~~~~

6 changes: 3 additions & 3 deletions pyroomacoustics/libroom_src/rir_builder.cpp
Original file line number Diff line number Diff line change
@@ -44,8 +44,8 @@ constexpr T get_pi() {
template <class T>
void threaded_rir_builder_impl(
py::array_t<T, py::array::c_style | py::array::forcecast> rir,
const py::array_t<T, py::array::c_style | py::array::forcecast> time,
const py::array_t<T, py::array::c_style | py::array::forcecast> alpha,
const py::array_t<T, py::array::c_style | py::array::forcecast> &time,
const py::array_t<T, py::array::c_style | py::array::forcecast> &alpha,
int fs, size_t fdl, size_t lut_gran, size_t num_threads) {

auto pi = get_pi<T>();
@@ -162,7 +162,7 @@ void threaded_rir_builder_impl(
for (auto &&result : sum_results) result.get();
}

void rir_builder(py::buffer rir, const py::buffer time, const py::buffer alpha,
void rir_builder(py::buffer rir, const py::buffer &time, const py::buffer &alpha,
int fs, size_t fdl, size_t lut_gran, size_t num_threads) {
// dispatch to correct implementation depending on input type
auto buf = pybind11::array::ensure(rir);
2 changes: 1 addition & 1 deletion pyroomacoustics/libroom_src/rir_builder.hpp
Original file line number Diff line number Diff line change
@@ -7,7 +7,7 @@

namespace py = pybind11;

void rir_builder(py::buffer rir, const py::buffer time, const py::buffer alpha,
void rir_builder(py::buffer rir, const py::buffer &time, const py::buffer &alpha,
int fs, size_t fdl, size_t lut_gran, size_t num_threads);

void delay_sum(const py::buffer irs, const py::buffer delays, py::buffer output,
You are viewing a condensed version of this merge commit. You can view the full changes here.