Skip to content

Conversation

@SimonBuechner
Copy link

Which issue(s) are closed by this pull request?

Closes #39

Changes proposed in this pull request:

  • time dependant energy ratio base function for roomacoustic parameters
  • tests for energy ratio base function utilizing fixture

@SimonBuechner SimonBuechner added this to the v1.0.0 milestone Nov 21, 2025
@SimonBuechner SimonBuechner requested a review from a team November 21, 2025 14:31
@SimonBuechner SimonBuechner self-assigned this Nov 21, 2025
@SimonBuechner SimonBuechner added the enhancement New feature or request label Nov 21, 2025
Copy link
Member

@mberz mberz left a 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?

@github-project-automation github-project-automation bot moved this from Backlog to Require review in Weekly Planning Nov 28, 2025
SimonBuechner and others added 7 commits November 28, 2025 16:25
@SimonBuechner SimonBuechner requested a review from mberz November 30, 2025 17:04
Copy link
Member

@hoyer-a hoyer-a left a 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.

SimonBuechner and others added 4 commits December 1, 2025 19:43
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>
Copy link
Member

@mberz mberz left a 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. :)

Copy link
Member

@hoyer-a hoyer-a left a 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.

Copy link
Member

@hoyer-a hoyer-a left a 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.

Copy link
Member

@mberz mberz left a 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.

@mberz mberz merged commit a8e1382 into develop Dec 12, 2025
12 checks passed
@github-project-automation github-project-automation bot moved this from Require review to Done in Weekly Planning Dec 12, 2025
@mberz mberz deleted the feature-energy_ratio_base_function branch December 12, 2025 13:28
SimonBuechner added a commit that referenced this pull request Dec 12, 2025
* _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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

4 participants