Repository navigation
Conversation
…icient 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.
Summary
Adds
pytta.iso11654, the rating of sound absorption of ISO 11654:1997, which turns the one-third octave absorption coefficients measured by ISO 354 into the single number α_w used in product data:practical_absorption(alpha): the practical coefficient α_p of each octave, the arithmetic mean of its three one-third octave values to the second decimal, rounded in steps of 0.05 and limited to 1.00 (4.1).weighted_absorption(alpha_p): α_w and the shape indicators (4.2 and 4.3). The reference curve (0.80, 1.00, 1.00, 1.00 and 0.90 from 250 Hz to 4 kHz) moves in steps of 0.05 towards the measured values until the sum of the unfavourable deviations is 0.10 or less, and α_w is the shifted curve at 500 Hz. A practical coefficient 0.25 or more above the shifted curve adds L (250 Hz), M (500 Hz or 1 kHz) or H (2 kHz or 4 kHz).rating(alpha_w, shape): the rating as the standard writes it, e.g.0.60(M).The shifting is done in hundredths, with integers, so the steps of 0.05 and the criterion of 0.10 are exact.
Source and limits
The clauses and the examples were read from the preview of ISO 11654:1997 that ISO publishes, which holds clauses 1 to 5 and Annex A. The informative Annex B, the absorption classes A to E, is not in that preview, so it is left out until its table can be checked against the standard.
Tests
tests/test_iso11654.pychecks the rules and the examples of the standard: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