-
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 1 commit
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,39 @@ | |
| """ | ||
| import numpy as np | ||
|
|
||
| def schroeder_frequency(V, T): | ||
| r""" | ||
| function which calculates the Schroeder frequency. The cut-off | ||
| frequency for modes. | ||
|
|
||
|
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. Please add the source - the citation is broken
Author
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. nice hint, but we don´t know how ... seems as broken as for energy_decay_curve_analytic function below. |
||
| Approved by Monty Python Flying Circus. | ||
|
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. We appreciate Your sense of humour, although this should be a serious scientific documentation. |
||
|
|
||
| .. math:: | ||
|
|
||
| f_s = 2000 * \sqrt(\frac{T}{V}) | ||
|
|
||
| Parameters | ||
| ---------- | ||
| V : float, np.ndarray | ||
|
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. Please follow the variable naming convention adopted in the project, i.e.: |
||
| room volume in m^3 | ||
| T : float, np.ndarray | ||
| reverberation time in s | ||
|
|
||
| Returns | ||
| ------- | ||
| schroeder_freq : float, np.ndarray | ||
|
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. The documentation return statement does not match the actual return variable name. Please repair and change to schroeder_frequency according to convention |
||
| 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 |
||
| f_s = 2000*np.sqrt(T / V) | ||
|
|
||
| return f_s | ||
|
|
||
| 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, change the sentence to: Calculate the Schroeder cut-off frequency of a room