-
Notifications
You must be signed in to change notification settings - Fork 14
feature/add_schroeder_frequency_function #101
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
base: develop
Are you sure you want to change the base?
Changes from 3 commits
67ab825
e3a1cfb
3b25a8e
a2641e1
2b03d4c
f7e3391
ee29225
b912be8
e5f4524
cece9cd
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -5,6 +5,38 @@ | |
| """ | ||
| import numpy as np | ||
|
|
||
| def schroeder_frequency(volume, reverberation_time): | ||
| r""" | ||
| Calculate the Schroeder cut-off frequency of a room. | ||
|
|
||
| Calculation according to [#]_. | ||
|
|
||
| .. math:: | ||
|
|
||
| f_s = 2000 \sqrt{\left(\frac{T}{V}\right)} | ||
|
|
||
| Parameters | ||
| ---------- | ||
| volume : double, np.ndarray | ||
| room volume in m^3 | ||
| reverberation_time : double, np.ndarray | ||
| reverberation time in s | ||
|
|
||
| Returns | ||
| ------- | ||
| schroeder_frequency : float, np.ndarray | ||
| schroeder frequency in Hz | ||
|
|
||
| References | ||
| ---------- | ||
| .. [#] H. Kuttruff, Room acoustics, 4th Ed. Taylor & Francis, 2009. | ||
|
|
||
| """ | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Maybe you can do a validation check of the input parameters. For example, the volume needs to be greater than zero. 🔢
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. here we could raise error, if the input parameters of the function are not valid. See the Guidelines |
||
| schroeder_frequency = 2000*np.sqrt(reverberation_time / volume) | ||
|
|
||
| return schroeder_frequency | ||
|
|
||
| def energy_decay_curve_analytic( | ||
| surfaces, alphas, volume, times, source=None, | ||
| receiver=None, method='eyring', c=343.4, frequency=None, | ||
|
|
||
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.
Please add the source - the citation is broken
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.
nice hint, but we don´t know how ... seems as broken as for energy_decay_curve_analytic function below.