Title: Hanning window correction in Tonality analysis · Issue #255 · python-acoustics/python-acoustics · GitHub
Open Graph Title: Hanning window correction in Tonality analysis · Issue #255 · python-acoustics/python-acoustics
X Title: Hanning window correction in Tonality analysis · Issue #255 · python-acoustics/python-acoustics
Description: I am confused about the Tonality class in iso_1996_2_2007.py. On line 34 of iso_1996_2_2007.py a correction for Hanning windows is defined: _WINDOW_CORRECTION = { 'hanning': -1.8, } This correction is subtracted from the total level of t...
Open Graph Description: I am confused about the Tonality class in iso_1996_2_2007.py. On line 34 of iso_1996_2_2007.py a correction for Hanning windows is defined: _WINDOW_CORRECTION = { 'hanning': -1.8, } This correction...
X Description: I am confused about the Tonality class in iso_1996_2_2007.py. On line 34 of iso_1996_2_2007.py a correction for Hanning windows is defined: _WINDOW_CORRECTION = { 'hanning': -1.8, } This co...
Opengraph URL: https://github.com/python-acoustics/python-acoustics/issues/255
X: @github
Domain: patch-diff.githubusercontent.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Hanning window correction in Tonality analysis","articleBody":"I am confused about the Tonality class in iso_1996_2_2007.py. \r\n\r\nOn line 34 of iso_1996_2_2007.py a correction for Hanning windows is defined:\r\n`_WINDOW_CORRECTION = {\r\n 'hanning': -1.8,\r\n}`\r\n\r\nThis correction is subtracted from the total level of the sum of all lines of the tones in the cricital band on line 505, so effectively 1.8 dB is added:\r\n`tone_level = tones_level(tone_lines) - window_correction(window)`\r\n\r\nI understand the reason for a 1.8 dB correction is explained in the note after equation C.1 in ISO 1996-2: 2007:\r\n\r\n\u003eNOTE If a 'tone' is a narrow band of noise, or if the frequency of a tone varies, the tone appears as several lines in the averaged spectrum. In such cases, the tone level, L_pt, is the energy sum of all lines, with levels within 6 dB of the local maximum level and corrected for the influence of the applied window function. (For Hanning weighting, this is the energy sum of the lines minus 1.8 dB.)\r\n\r\nI believe the same correction is applied when calculating the total masking noise level in equation C.11, calculated with the function on line 78:\r\n`return dbsum(noise_lines) + 10.0 * np.log10(frequency_resolution / effective_analysis_bandwidth)\r\n`\r\nWhen using a Hanning window this is roughly equivalent to: \r\n`return dbsum(noise_lines) - 1.8\r\n`\r\n\r\nSo to summarise I would expect on line 505 the -1.8 dB should be added to the total tone level. I hope somebody can shed some light on this. Any help would be greatly appreciated!\r\n","author":{"url":"https://github.com/thvanbon","@type":"Person","name":"thvanbon"},"datePublished":"2021-12-01T14:12:24.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/255/python-acoustics/issues/255"}
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:cfba7300-4600-f44a-86a8-9b8962a42089 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 880E:1230D0:FF300:15ABC0:698E1957 |
| html-safe-nonce | 4c580c11e7741f04c22280a4f4ec38c4ee94c2229c707f3de0b515f80e13e547 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4ODBFOjEyMzBEMDpGRjMwMDoxNUFCQzA6Njk4RTE5NTciLCJ2aXNpdG9yX2lkIjoiMTcxNjgxNDY0MzIwNzIxNTQ0NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | d918e18ead736bd70b2a0f2e90be0db3530eae96a783b84aaf3ccc43d5672efd |
| hovercard-subject-tag | issue:1068457197 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python-acoustics/python-acoustics/255/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2dfc2629299f2aaf3d0f82bf4398de92fdc5805bcc87f708f2d05a76bc121903/python-acoustics/python-acoustics/issues/255 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2dfc2629299f2aaf3d0f82bf4398de92fdc5805bcc87f708f2d05a76bc121903/python-acoustics/python-acoustics/issues/255 |
| og:image:alt | I am confused about the Tonality class in iso_1996_2_2007.py. On line 34 of iso_1996_2_2007.py a correction for Hanning windows is defined: _WINDOW_CORRECTION = { 'hanning': -1.8, } This correction... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | thvanbon |
| hostname | github.com |
| expected-hostname | github.com |
| None | 52130a026bd9a3f98228b6aa6af91acdab5d18de411e2c1e67e6253493561296 |
| turbo-cache-control | no-preview |
| go-import | github.com/python-acoustics/python-acoustics git https://github.com/python-acoustics/python-acoustics.git |
| octolytics-dimension-user_id | 3644840 |
| octolytics-dimension-user_login | python-acoustics |
| octolytics-dimension-repository_id | 14710112 |
| octolytics-dimension-repository_nwo | python-acoustics/python-acoustics |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 14710112 |
| octolytics-dimension-repository_network_root_nwo | python-acoustics/python-acoustics |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | 301a1d7743177dcb7528b1322117cdafeda8ff08 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width