Class AcousticIndicatorsFunctions
- java.lang.Object
-
- org.noise_planet.noisemodelling.pathfinder.utils.AcousticIndicatorsFunctions
-
public class AcousticIndicatorsFunctions extends Object
A utility class providing acoustic indicator functions for computations, including conversions between decibels and energy, summation and multiplication of arrays, and operations specific to octave bands.
-
-
Constructor Summary
Constructors Constructor Description AcousticIndicatorsFunctions()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static Integer[]
asOctaveBands(int[] thirdOctaveBands)
Create new array by taking middle third octave bandsstatic Double[]
asOctaveBands(Double[] thirdOctaveBands)
Create new array by taking middle third octave bandsstatic Integer[]
asOctaveBands(Integer[] thirdOctaveBands)
Create new array by taking middle third octave bandsstatic double
dBToW(double dB)
Convert Decibel to Wattstatic double[]
dBToW(double[] dB)
Convert Decibel to Wattstatic double[]
multiplicationArray(double[] array, double coefficient)
Multiply component of two same size arraystatic double[]
multiplicationArray(double[] array1, double[] array2)
Multiply component of two same size arraystatic double
sumArray(double[] energeticSum)
Sum of all the components of this given liststatic double[]
sumArray(double[] array, double number)
static double[]
sumArray(double[] array1, double[] array2)
Element wise sum array without any other operations.static double
sumArray(int nbfreq, double[] energeticSum)
sum the first nbfreq values in a given arraystatic double[]
sumArrayWithPonderation(double[] array1, double[] array2, double p)
Eq 2.5.9 The ‘long-term’ sound level along a path starting from a given point source is obtained from the logarithmic sum of the weighted sound energy in homogeneous conditions and the sound energy in favourable conditions.static double
sumDbArray(double[] array1)
Sum of all the decibel components of this given liststatic double[]
sumDbArray(double[] array1, double[] array2)
energetic Sum of two same size dB arraystatic double[]
twoDgtAftrComma(double[] valeurs)
static double
wToDb(double w)
Convert Watt to Decibelstatic double[]
wToDb(double[] w)
Convert Watt to Decibel
-
-
-
Method Detail
-
dBToW
public static double dBToW(double dB)
Convert Decibel to Watt- Parameters:
dB
- Sound power spectrum in dB (or dBa , no weighting is done here)- Returns:
- Watt value
-
dBToW
public static double[] dBToW(double[] dB)
Convert Decibel to Watt- Parameters:
dB
- Sound power spectrum in dB (or dBa , no weighting is done here)- Returns:
- Watt value
-
wToDb
public static double wToDb(double w)
Convert Watt to Decibel- Parameters:
w
-- Returns:
- Decibel value
-
wToDb
public static double[] wToDb(double[] w)
Convert Watt to Decibel- Parameters:
w
-- Returns:
- Decibel value
-
twoDgtAftrComma
public static double[] twoDgtAftrComma(double[] valeurs)
-
sumArrayWithPonderation
public static double[] sumArrayWithPonderation(double[] array1, double[] array2, double p)
Eq 2.5.9 The ‘long-term’ sound level along a path starting from a given point source is obtained from the logarithmic sum of the weighted sound energy in homogeneous conditions and the sound energy in favourable conditions.- Parameters:
array1
- double arrayarray2
- double arrayp
- the mean occurrence p of favourable conditions in the direction of the path (S,R)- Returns:
-
sumDbArray
public static double[] sumDbArray(double[] array1, double[] array2)
energetic Sum of two same size dB array- Parameters:
array1
-array2
-- Returns:
-
sumDbArray
public static double sumDbArray(double[] array1)
Sum of all the decibel components of this given list- Parameters:
array1
-- Returns:
- the sum in decibel
-
multiplicationArray
public static double[] multiplicationArray(double[] array1, double[] array2)
Multiply component of two same size array- Parameters:
array1
-array2
-- Returns:
-
multiplicationArray
public static double[] multiplicationArray(double[] array, double coefficient)
Multiply component of two same size array- Parameters:
array
- Array inputcoefficient
- number to multiply at each index- Returns:
- Array multiplied
-
sumArray
public static double sumArray(int nbfreq, double[] energeticSum)
sum the first nbfreq values in a given array- Parameters:
nbfreq
-energeticSum
-- Returns:
- the sum value
-
sumArray
public static double sumArray(double[] energeticSum)
Sum of all the components of this given list- Parameters:
energeticSum
-- Returns:
- sum value
-
sumArray
public static double[] sumArray(double[] array1, double[] array2)
Element wise sum array without any other operations.- Parameters:
array1
- First arrayarray2
- Second array- Returns:
- Sum of the two arrays
-
sumArray
public static double[] sumArray(double[] array, double number)
-
asOctaveBands
public static Double[] asOctaveBands(Double[] thirdOctaveBands)
Create new array by taking middle third octave bands- Parameters:
thirdOctaveBands
- Third octave bands array- Returns:
- Octave bands array
-
asOctaveBands
public static Integer[] asOctaveBands(Integer[] thirdOctaveBands)
Create new array by taking middle third octave bands- Parameters:
thirdOctaveBands
- Third octave bands array- Returns:
- Octave bands array
-
asOctaveBands
public static Integer[] asOctaveBands(int[] thirdOctaveBands)
Create new array by taking middle third octave bands- Parameters:
thirdOctaveBands
- Third octave bands array- Returns:
- Octave bands array
-
-