Skip to content

RAP center time#169

Open
artur-pa wants to merge 7 commits into
developfrom
feature/center_time
Open

RAP center time#169
artur-pa wants to merge 7 commits into
developfrom
feature/center_time

Conversation

@artur-pa

Copy link
Copy Markdown
Member

Changes proposed in this pull request:

  • Add center_time() function to parameters.py that computes the room-acoustic center time $T_s$ from an energy decay curve
  • Add tests for center_time() in test_parameters.py

@artur-pa artur-pa added this to the v1.1.0 milestone Apr 23, 2026
@artur-pa artur-pa self-assigned this Apr 23, 2026
Copilot AI review requested due to automatic review settings April 23, 2026 08:11
@artur-pa artur-pa added the enhancement New feature or request label Apr 23, 2026
@artur-pa artur-pa moved this from Backlog to Require review in Weekly Planning Apr 23, 2026
@artur-pa artur-pa review requested due to automatic review settings April 23, 2026 08:12
Copilot AI review requested due to automatic review settings April 24, 2026 09:13

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds computation and test coverage for the room-acoustic center time parameter (T_s) based on an energy decay curve (EDC), integrating into the existing pyrato.parameters suite.

Changes:

  • Add center_time() to pyrato/parameters.py to compute (T_s) from an EDC.
  • Add unit tests for center_time() in tests/test_parameters.py.
  • Bump package version to 1.0.0 in project metadata.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
pyrato/parameters.py Introduces center_time() parameter calculation from EDC data.
tests/test_parameters.py Adds shape/type validation and analytical/multichannel tests for center_time().
pyrato/__init__.py Updates package __version__ to 1.0.0.
pyproject.toml Updates project version and bumpversion current_version to 1.0.0.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread pyrato/parameters.py Outdated
Comment thread pyrato/parameters.py
Comment thread tests/test_parameters.py
Comment thread pyproject.toml Outdated

@f-brinkmann f-brinkmann left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thx, code and tests look fine. Can you merge the latest develop/main to get rid of the changes related to the version?

Comment thread pyrato/__init__.py Outdated
Comment thread pyproject.toml Outdated
Comment thread pyproject.toml Outdated

@ahms5 ahms5 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks, looks fine, i rather have smaller suggestions.

Comment thread pyrato/parameters.py Outdated
Comment thread pyrato/parameters.py Outdated
Comment thread tests/test_parameters.py
center_time(edc)

def test_center_time_rejects_zero_initial_energy():
"""Reject EDC with zero initial energy (would cause division by zero)."""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

would it make sence to check for a plausible ETC as well, e.g. if the energy is positive and decaying, sth like np.all(np.diff(etc.time,axis=-1)<=0) and np.all(etc.time>=0)?
That might also be related to other methods and might be a larger thing.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This issue actually involves several methods. Should we open a new pull request for this?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The first check would typically fail for experimental data where the decay curve is not strictly exponential (decaying sinusoids)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have opend an issue #172, its not part of this pr

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True!

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just decaying not exponential decaying.

Comment thread pyrato/__init__.py Outdated
@artur-pa artur-pa force-pushed the feature/center_time branch from 8ac560a to c12898b Compare May 8, 2026 07:22
@artur-pa artur-pa requested review from ahms5 and f-brinkmann May 8, 2026 08:41

@mberz mberz left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for implementing. Please see the comments below.

Comment thread pyrato/parameters.py Outdated
Comment thread pyrato/parameters.py
Comment thread pyrato/parameters.py Outdated
Comment thread pyrato/parameters.py Outdated
Comment thread tests/test_parameters.py
center_time(edc)

def test_center_time_rejects_zero_initial_energy():
"""Reject EDC with zero initial energy (would cause division by zero)."""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have opend an issue #172, its not part of this pr

Comment thread tests/test_parameters.py
center_time(edc)

def test_center_time_rejects_zero_initial_energy():
"""Reject EDC with zero initial energy (would cause division by zero)."""

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just decaying not exponential decaying.

@artur-pa artur-pa requested review from ahms5 and mberz May 13, 2026 11:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request v1.1.0

Projects

Status: Require review

Development

Successfully merging this pull request may close these issues.

5 participants