Skip to content

Refactor: Eyring reverberation time calculation#131

Merged
f-brinkmann merged 16 commits intodevelopfrom
refactor/eyring_eq
Feb 20, 2026
Merged

Refactor: Eyring reverberation time calculation#131
f-brinkmann merged 16 commits intodevelopfrom
refactor/eyring_eq

Conversation

@mberz
Copy link
Member

@mberz mberz commented Feb 16, 2026

Changes proposed in this pull request:

I have refactored the reverberation time function based on Eyring's equation.

  • update name
  • update input variable names
  • use equation based on the speed of sound in accordance with the cited paper
  • extend docstring
  • update tests

- update input variable names
- extend docstring
- update tests
@mberz mberz added this to the v1.0.0 milestone Feb 16, 2026
@mberz mberz moved this from Backlog to Implementation in progress in Weekly Planning Feb 16, 2026
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This pull request refactors the Eyring reverberation time calculation function to improve code quality and documentation. The changes rename parameters for clarity, add type hints, expand the docstring with mathematical formulas and examples, and make the function more flexible by adding a speed_of_sound parameter and supporting array inputs for mean_absorption.

Changes:

  • Renamed function parameters: surfacesurface_area, mean_alphamean_absorption
  • Added type hints to function signature and new speed_of_sound parameter with default value
  • Enhanced docstring with detailed mathematical formula, parameter descriptions, examples, and improved formatting
  • Updated validation logic and calculation to use more explicit formula components
  • Updated test file formatting (spacing, parametrize syntax) and error message matchers

Reviewed changes

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

File Description
pyrato/parametric.py Refactored reverberation_time_eyring function with renamed parameters, type hints, expanded docstring, new speed_of_sound parameter, and updated calculation formula
tests/test_parametric_eyring.py Updated test formatting, parametrize syntax, and error message matchers to align with refactored function

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

def reverberation_time_eyring(
volume: float,
surface_area: float,
mean_absorption: np.typing.NDArray[float],
Copy link

Copilot AI Feb 16, 2026

Choose a reason for hiding this comment

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

The type annotation np.typing.NDArray[float] is incorrect for the mean_absorption parameter. According to the docstring, this parameter can be either a float or a numpy.ndarray. The correct type annotation should be float | np.typing.NDArray[np.float64] or Union[float, np.typing.NDArray[np.float64]]. Additionally, np.typing.NDArray expects a numpy dtype, not the Python built-in float type.

Copilot uses AI. Check for mistakes.
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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


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

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

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


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

@mberz mberz linked an issue Feb 19, 2026 that may be closed by this pull request
@mberz mberz self-assigned this Feb 19, 2026
@mberz mberz added enhancement New feature or request refactor and removed enhancement New feature or request labels Feb 19, 2026
Copy link
Member

@f-brinkmann f-brinkmann left a comment

Choose a reason for hiding this comment

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

Thanks - looks good to me.

Copy link
Contributor

@artur-pa artur-pa 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!

@github-project-automation github-project-automation bot moved this from Implementation in progress to Reviewer Approved in Weekly Planning Feb 19, 2026
@f-brinkmann f-brinkmann merged commit 6d41ee3 into develop Feb 20, 2026
20 of 21 checks passed
@github-project-automation github-project-automation bot moved this from Reviewer Approved to Done in Weekly Planning Feb 20, 2026
@mberz mberz deleted the refactor/eyring_eq branch February 26, 2026 18:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[MAINT] Cleanup ASSA 2025 merge in the parametric module

4 participants