Skip to content
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

Bug: EPNL=-inf if PNLT remains above Decay after PNLT_idx #5

Merged
merged 2 commits into from
Jun 20, 2024

Conversation

mlotinga
Copy link
Contributor

If the remaining values in PNLT after PNLT(PNLT_idx) do not drop below the value of Decay, idx_t2 returns empty and the duration correction cannot be completed, resulting in EPNL = -inf.

In this case, a reasonable fix is to take the last index of PNLT as idx_t2.

…_t2 to the last index in PNLT in case PNLT never gets <Decay
@ggrecow
Copy link
Owner

ggrecow commented Jun 20, 2024

Many thanks for your bug report.

Would you be able to share your input sound file so I can reproduce the error ? I imagine there would also be cases on which the PNLT BEFORE PNLT(PNLT_idx) do not drop below the value of Decay either and <idx_t1> would be infinite.

Therefore I ask: there is any (formal) recommendations on how to deal in such cases ? In my opinion, the duration correction is important for ensuring comparison between cases with different durations but also serves as a kind of SNR measure. Maybe such low SNR would invalidate the use of the EPNL and the results could be only presented in terms of the time-varying PNLT curve ? or then the duration correction=zero and the EPNL becomes PNLT ?

Kind regards,

Gil.

@ggrecow
Copy link
Owner

ggrecow commented Jun 20, 2024

For info: just found this in the DOC 9501, Environmental Technical Report Manual -- Volume I Procedures for the Noise Certification of aircraft. Off course this holds mainly for formal aircraft noise certification purposes, Anyway, if you use any other decay value to compute the duration correction -> EPNL, this value needs to be clearly reported.

Capturar

@ggrecow ggrecow self-assigned this Jun 20, 2024
@mlotinga
Copy link
Contributor Author

mlotinga commented Jun 20, 2024

I agree, in terms of aircraft noise certification, it would be necessary to inform the user of this drawback of the input data. Where this may occur in practice for users is where the event being processed is not a certification flight, but a recording of, for example, some other type of flight operation. For the purpose of calculating a value that makes more sense than -inf, the next best option is to use the remaining duration of the input file. An output warning to the user could also be inserted in accordance with the certification requirements.

@ggrecow
Copy link
Owner

ggrecow commented Jun 20, 2024

In my opinion, integrating over the entire PNLT curve could make more sense (for comparison reasons) in such cases instead of using an arbitrary decay value. But this may vary depending on the signals to be compared off course...

In this case, the result would not be EPNL though but rather something like the Sound Exposure Level or an Equivalent value from the PNLT instead of SPL.

I will think how to address this on the code for general use. But I would be more inclinated towards just generating an error to the user and abort the calculation if the stipulated decay threshold can not be achieved. For very specific cases, the user is off course free to make any modifications within reasonable assumptions. In such cases, any modifications/assumptions must be clearly reported.

Cheers,

Gil.

@mlotinga
Copy link
Contributor Author

I amended my previous comment - it's not the whole duration of course, but just the part that follows the t1 index when the threshold is exceeded.

@ggrecow ggrecow merged commit d221249 into ggrecow:main Jun 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants