Skip to content
This repository was archived by the owner on Feb 7, 2024. It is now read-only.

Implemented weighting from NOAA guidelines#231

Open
matsimurda wants to merge 4 commits intopython-acoustics:masterfrom
matsimurda:noaa_guidelines_weighting
Open

Implemented weighting from NOAA guidelines#231
matsimurda wants to merge 4 commits intopython-acoustics:masterfrom
matsimurda:noaa_guidelines_weighting

Conversation

@matsimurda
Copy link
Copy Markdown

General comments:

This PR adds auditory weighting functions as specified in NOAA guidelines document 'Technical Guidance for Assessing the Effects of Anthropogenic Sound on Marine Mammal Hearing' available at https://www.fisheries.noaa.gov/webdam/download/75962998 (Table ES2 and formulas below)

This enhancement would make the module more useful for underwater acoustics.

This weighting is currently being frequently used in contexts of environmental impact assessments when discussing underwater noise in US but the general trend suggests that NOAA guidelines will be adapted in other countries (e.g. UK).

Implementation comments:

Besides adding additional weightings I also had to increase the frequency range to 200 kHz ->Some weighting curves are applied at much higher frequencies.

@FRidh
Copy link
Copy Markdown
Member

FRidh commented May 23, 2019

Thanks for the PR. The weightings that are now modified are now no longer according to IEC 61672-1:2003. Please keep those as they were and instead have a copy for NOAA in a separate module.

@FRidh
Copy link
Copy Markdown
Member

FRidh commented May 23, 2019

Considering this is following guidelines or a standard, it may be better to follow the approach in the acoustics/standards folder. Otherwise, the module could be weighting_noaa.py.

…oaa-related logic/tests into separate files 'weighting_noaa.py' and 'test_weighting_noaa.py'
@matsimurda
Copy link
Copy Markdown
Author

Thanks for the feedback. I have moved all NOAA related logic/tests into separate files

NumPy array with NOAA LF-weighting between ``first`` and ``last``
centerfrequencies.
"""
return _weighting("noaa_lf", first, last)
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

I think we should make this public so we can remove all duplicate code.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

There is a different frequency range defined in the two files. Could you please indicate where you want the public method located and how you imagine it should look like?

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Hi there,

Just following back on this old PR: Could I kindly get you to elaborate on your comment so I can amend my code and we can complete this request?

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants