Skip to content

Commit

Permalink
Update threshold_in_quiet_db.py
Browse files Browse the repository at this point in the history
  • Loading branch information
nielsdekoeijer authored Nov 19, 2024
1 parent 2ca60b1 commit ef94ec5
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions libdetectability/internal/threshold_in_quiet_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,12 @@


def threshold_in_quiet_db(freq, regularized=False):
value = (
3.64 * np.power(freq / 1000.0, -0.8)
- 6.5 * np.exp(-0.6 * np.power(freq / 1000.0 - 3.3, 2))
+ 10e-4 * np.power(freq / 1000.0, 4)
)
with np.errstate(divide='ignore'):
value = (
3.64 * np.power(freq / 1000.0, -0.8)
- 6.5 * np.exp(-0.6 * np.power(freq / 1000.0 - 3.3, 2))
+ 10e-4 * np.power(freq / 1000.0, 4)
)

if regularized:
return np.maximum(value, 30)
Expand Down

0 comments on commit ef94ec5

Please sign in to comment.