Repository navigation
Conversation
… peak Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
_start_sample_ISO3382finds where an impulse response starts, the last sample before the maximum that lies 20 dB below it (ISO 3382-1:2009, A.3.4), andcrop_IRandRoomAnalysiscut the broadband response there. Two of its cases returned sample 1 where sample 0 is meant, a remnant of 1-based indexing:Both now return 0. The other cases keep the index of the last sample below the threshold, the same convention as
ita_start_IRof the ITA-Toolbox.A response with exact silence before its peak, as image sources give, also printed a
RuntimeWarningfor the logarithm of zero; that warning is silenced, since those samples are below any threshold anyway.The tests in
tests/test_ir_start.pycheck the three cases with synthetic responses: the peak on the first sample gives 0, a ramp to a peak at sample 100 gives the last sample of the ramp 20 dB below it, and a single sample below the threshold at the start gives 0. The first and the last fail without this change.Checked with Python 3.12, numpy 1.26 and scipy 1.17. The 7 failures of
development(3 intest_h5io.py, 4 intest_pyttasave.py) are the same with and without this change.Co-Authored-By: Claude Fable 5.1 noreply@anthropic.com