-
Notifications
You must be signed in to change notification settings - Fork 15
Energy Ratio base function for room-acoustic parameters #108
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
Conversation
mberz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the new PR.
I've not read the docstring thoroughly, this is just a review of the code. The comment on the 2 EDCs is more a conceptual one.
What is the second edc for (it's not directly obvious, at least to me)? Calculation of strength?
Co-authored-by: Marco Berzborn <mberz@users.noreply.github.com>
Co-authored-by: Marco Berzborn <mberz@users.noreply.github.com>
Docstring adjusted to explain neccessity of two separate EDCs
… correct cast of limits input from list
…rn result in cshape
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for implementing!
Just have some questions and small suggestions. I will then take a look at the tests.
Co-authored-by: Anton Hoyer <156099087+hoyer-a@users.noreply.github.com>
_energy_ratio edc input type pf.TimeData and derived objects changed Co-authored-by: Anton Hoyer <156099087+hoyer-a@users.noreply.github.com>
mberz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
A couple of minor things. After that it should be good to go. :)
Co-authored-by: Marco Berzborn <mberz@users.noreply.github.com>
hoyer-a
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, the function looks good to me now!
Just some more comments on tests.
hoyer-a
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks! The parametrization made one test redundant, apart from that it looks good to me.
mberz
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, I'd like to squash the commit history though since it went through a lot of small changes during the review process.
* _energy_ratio and accordings tests added from corrupted branch * test adjusted to fixture, renamed to "...energy_ratio..." * test_parameters comment structure changed * Update pyrato/parameters.py balance -> ratio Co-authored-by: Marco Berzborn <mberz@users.noreply.github.com> * Update pyrato/parameters.py, calculations more efficient Co-authored-by: Marco Berzborn <mberz@users.noreply.github.com> * _energy_ratio accepts limits as ndarray, list and tuple. Docstring adjusted to explain neccessity of two separate EDCs * ruff compliancy added * test_energy_ratio_rejects_non_numpy_array_limits adjusted to check fo correct cast of limits input from list * order corrected in numerator-denominator extraction. Adjusted to return result in cshape * ruff compliancy, tests added to reject wrong limits type (new) * _energy_ratio input type documentation Co-authored-by: Anton Hoyer <156099087+hoyer-a@users.noreply.github.com> * Apply suggestions from code review _energy_ratio edc input type pf.TimeData and derived objects changed Co-authored-by: Anton Hoyer <156099087+hoyer-a@users.noreply.github.com> * _energy_ratio doc changed: requiring two edcs * ruff linting * _energy_ratio docs limit nomenclature Co-authored-by: Marco Berzborn <mberz@users.noreply.github.com> * _energy_ratio docstring formulas changed * docstring examples added, edc-limit-idx separated each according edc * input check for limiti < signal_length of edc including tests added * valid limits tests for separate edcs included, tests modified accordingly * PEP8 compliancy * PEP8 compliancy * hoyer-a requested chanes in _energy_ratio tests * ruff linting * spelling changes * hoyer-a requested changes * renamed test * changed name test * adjusted parametrized test to multichannel input signal * redundant multichannel test removed * spelling in Docstring * re-added parametrized multichannel shape test --------- Co-authored-by: simon.buechner22 <simon.buechner22@campus.tu-berlin.de> Co-authored-by: Marco Berzborn <mberz@users.noreply.github.com> Co-authored-by: Anton Hoyer <156099087+hoyer-a@users.noreply.github.com>
Which issue(s) are closed by this pull request?
Closes #39
Changes proposed in this pull request: