Calculate the pure tone attenuation of sound in air according to
ISO 9613-1.
Calculation is in accordance with ISO 9613-1 [8]. The shape of the
outputs is broadcasted from the shapes of the temperature,
relative_humidity, and atmospheric_pressure.
The frequency bins represents the last dimension.
Parameters:
temperature (float, array_like) – Temperature in degree Celsius.
Must be in the range of -20°C to 50°C for accuracy of +/-10% or
must be greater than -70°C for accuracy of +/-50%.
frequencies (float, array_like) – Frequency in Hz. Must be greater than 50 Hz.
Just one dimensional array is allowed.
relative_humidity (float, array_like) – Relative humidity in the range from 0 to 1.
atmospheric_pressure (float, array_like, optional) – Atmospheric pressure in Pascal, by default
reference_atmospheric_pressure.
Returns:
alpha (np.ndarray[float]) – Pure tone air attenuation coefficient in decibels per meter for
atmospheric absorption.
m (FrequencyData) – Pure tone air attenuation coefficient per meter for
atmospheric absorption. The parameter m is calculated as
\(m = \alpha / (10 \cdot \log_{10}(e))\).
accuracy (FrequencyData) – accuracy of the results according to the standard:
10, +/- 10% accuracy
molar concentration of water vapour: 0.05% to 5 %.
air temperature: 253.15 K to 323.15 (-20 °C to +50°C)
atmospheric pressure: less than 200 000 Pa (2 atm)
frequency-to-pressure ratio: 0.0004 Hz/Pa to 10 Hz/Pa.
20, +/- 20% accuracy
molar concentration of water vapour: 0.005 % to 0.05 %,
and greater than 5%
air temperature: 253.15 K to 323.15 (-20 °C to +50°C)
atmospheric pressure: less than 200 000 Pa (2 atm)
frequency-to-pressure ratio: 0.0004 Hz/Pa to 10 Hz/Pa.
50, +/- 50% accuracy
molar concentration of water vapour: less than 0.005%
air temperature: greater than 200 K (- 73 °C)
atmospheric pressure: less than 200 000 Pa (2 atm)
frequency-to-pressure ratio: 0.0004 Hz/Pa to 10 Hz/Pa.
Calculate the density of air in kg/m³ based on the temperature,
relative humidity, and atmospheric pressure.
The density of air is calculated based on chapter 6.3 in [9].
All input parameters must be broadcastable to the same shape.
Parameters:
temperature (float, array_like) – Temperature in degrees Celsius (°C).
relative_humidity (float, array_like) – Relative humidity in the range from 0 to 1.
atmospheric_pressure (float, array_like, optional) – Atmospheric pressure in Pascal (Pa), by default
reference_atmospheric_pressure.
saturation_vapor_pressure (float, array_like, optional) – Saturation vapor pressure in Pascal (Pa).
The default uses the value and valid temperature range from
saturation_vapor_pressure_magnus.
Calculate the tolerance limits for fractional octave band filters.
Calculation is in accordance with IEC 61260-1:2014 [10] (Section 5.10 and
Table 1).
Note
The standard defines some lower tolerance limits as \(-\infty\),
which is inconvenient for plotting. The returned tolerance is -60000 dB
in these cases, which is below the smallest possible value of
20*np.log10(np.finfo(float).tiny\(\approx\)-6000 dB.
Parameters:
exact_center_frequency (float) – The exact center frequency of the band filter in Hz (see
fractional_octave_frequencies).
num_fractions (Literal[1, 3]) – The number of bands an octave is divided into. 1 for octave bands
and 3 for third octave bands.
tolerance_class (Literal[1, 2]) – The tolerance class as defined in the standard. Must be 1 or 2.
Returns:
lower_tolerance (numpy array) – Lower tolerance limits in dB of shape (19, ).
upper_tolerance (numpy array) – Upper tolerance limits in dB of shape (19, ).
frequencies (numpy array) – The frequencies in Hz at which the tolerance is given of shape (19, ).
References
Examples
Class 1 tolerance region and filter for the 1000 Hz octave band.
temperature (float, array_like) – Temperature in degree Celsius from 0°C to 30°C.
relative_humidity (float, array_like) – Relative humidity in the range of 0 to 1.
co2_ppm (float, array_like, optional) – CO2 concentration in parts per million. The default is
425.19 ppm, based on [13]. Value must be below
10 000 ppm (1%).
atmospheric_pressure (float, array_like, optional) – Atmospheric pressure in Pascal, by default
reference_atmospheric_pressure.
Value must be between 75 000 Pa to 102000 Pa.
Calculate speed of sound in air using the ideal gas law.
The speed of sound in air can be calculated based on chapter 6.3 in [14].
All input parameters must be broadcastable to the same shape.
Parameters:
temperature (float, array_like) – Temperature in degree Celsius.
relative_humidity (float, array_like) – Relative humidity in the range of 0 to 1.
atmospheric_pressure (float, array_like, optional) – Atmospheric pressure in Pascal, by default
reference_atmospheric_pressure.
saturation_vapor_pressure (float, array_like, optional) – Saturation vapor pressure in Pascal.
If not given, the function
saturation_vapor_pressure_magnus is used.
Note that the valid temperature range therefore also depends on
saturation_vapor_pressure_magnus.