Skip to content

Conversation

@MHAcoustics
Copy link

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

Closes #85

Changes proposed in this pull request:

An equation is added that calculates the reverberation time based on the Equation as proposed by Carl. F. Eyring

@ahms5 ahms5 added the ASSA 2025 Issues and PRs related to the Open Source Software school at ASSA 2025 label Nov 5, 2025
Copy link

@mjasins mjasins left a comment

Choose a reason for hiding this comment

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

Thank You for Your contribution. Please, look at our minor comment changes.


def Eyrings_equation(volume,surface,mean_alpha):
"""
function which calculates reverberation time in rooms as defined by Carl F. Eyring.
Copy link

Choose a reason for hiding this comment

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

Please, add reference

Copy link

Choose a reason for hiding this comment

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

Also, please change the function name according to project convention, eg. calculate_eyring_reverberation_time

Copy link
Author

Choose a reason for hiding this comment

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

Thanks, I added a reference. I will keep the name as it is similar to the other names in parametric.py

Copy link

Choose a reason for hiding this comment

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

Thank You - the request to change the function name was my fault - sorry for that.

Parameters
----------
volume : float, np.ndarray
Room volume
Copy link

Choose a reason for hiding this comment

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

Please, specify units

Copy link
Author

Choose a reason for hiding this comment

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

Good point, I added units

volume : float, np.ndarray
Room volume
sufaces : float, np.ndarray
Surface areas of all surfaces in the room
Copy link

Choose a reason for hiding this comment

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

Please, specify units

Copy link
Author

Choose a reason for hiding this comment

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

Agreed, I added a unit

Average absorption coefficient of room surfaces
Returns
-------
reverb_eyring: double
Copy link

Choose a reason for hiding this comment

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

The return in docstring does not match the actual return. Please consider and rename it to reverberation_time_eyring

Copy link
Author

Choose a reason for hiding this comment

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

Thanks for the proposal, I have used reverberation_time_eyring now

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 pull request.
I have some comments on input checking and equation rendering.

Comment on lines 161 to 162
.. math::
T_{60} = -0.161 \frac{\text{volume}}{\text{surface} \cdot \ln(1 - \text{mean\_alpha})}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
.. math::
T_{60} = -0.161 \frac{\text{volume}}{\text{surface} \cdot \ln(1 - \text{mean\_alpha})}
.. math::
T_{60} = -0.161 \frac{\text{volume}}{\text{surface} \cdot \ln(1 - \text{mean\_alpha})}

I think this could solve the formatting issue on the rendered docs.

.. [#] Eyring, C.F., 1930. Reverberation time in “dead” rooms. The Journal of the Acoustical Society of America, 1(2A_Supplement), pp.168-168.
"""

Copy link
Member

Choose a reason for hiding this comment

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

You could add some input data checks for cases where the equation is not giving valid results or where the computation might crash, such as negative surface areas or volumes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ASSA 2025 Issues and PRs related to the Open Source Software school at ASSA 2025

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants