Skip to main content

A zero dependency Python ITU-R 468 noise weighting filter (1 and 2 kHz)

Project description

itu_r_468_weighting

A zero dependency Python ITU-R 468 noise weighting filter (1 and 2 kHz)

Master branch: Build Status Coverage Status
Dev branch: Build Status Coverage Status

Introduction

This project consists of a sole function named r468. The function takes a frequency value and returns a weighted dB value. For weightening, the ITU-R BS.468-4 standard and the SMPTE RP 2054:2010 recommended practice are followed.

The math for this project is taken from Wikipedia (as of 2019-08-08):

Installation

pip install itu_r_468_weighting

More infos on the project page on PyPI.

Example Usage

from itu_r_468_weighting.filter import r468

r468(1000, "1khz")
r468(1000, "2khz")

Function Description

r468(frequency_hz, khz_option)

  • Takes a frequency value and returns a weighted dB value.

Parameters

frequency_hz : float

  • The frequency value (in Hz) must be a value greater 0.

khz_option : str

  • Choose 1khz or 2khz as an weighting option. The weighting curves have the same shape for both options. They are shifted in a way, that the gain is 0.0 dB at the given frequency (1 or 2 kHz).

Returns

float

  • The dB weighted value of the frequency.

Raises

ValueError

  • If parameter frequency_hz is not greater 0.
  • If parameter khz_option is not equal to 1khz or 2khz.

Developement

This project is hosted on GitHub.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

itu_r_468_weighting-1.0.2.tar.gz (3.6 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page