Repository navigation
Conversation
Frequency weightings A, C and Z from the poles of Annex E of IEC 61672-1:2013, time weightings F and S, and Leq, SEL, Lmax, Lpeak and percentile levels L_N, by channel, in dB re the dBRef of each channel. Tests check the A and C responses against Table 3 within the class 1 limits, the 4 kHz toneburst responses of Table 4 and the sound exposure of each burst, the levels of a steady 94 dB tone, and percentile levels. 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.
Adds the module
pytta.iec61672with the measures of a sound level meter, IEC 61672-1:2013:weighting_filter(kind, fs): second-order sections of the frequency weightings A and C from the pole frequencies of Annex E (computed from E.2.4 and E.3.4, which give 20.60, 107.7, 737.9 and 12 194 Hz), through the bilinear transform and normalized to 0 dB at 1 kHz.'Z'applies no filter.time_weighted_level(signalObj, weighting='A', time='F'): exponential time weighting with the time constants of 5.8.1 (F 0.125 s, S 1 s), at every sample.leq,sel,lmaxandlpeak(C-weighted by default), one value per channel.percentile_levels(signalObj, percents=(10, 50, 90)): the time-weighted level exceeded during N % of the signal.Levels are in dB re the
dBRefof each channel, which is 20 µPa for a channel in pascal.The tests in
tests/test_iec61672.pyuse the values of the standard:Checked with Python 3.12, numpy 1.26 and scipy 1.17. The existing tests behave as on
development: the 7 failures there (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