Class 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.
    • 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 bands
      static Double[] asOctaveBands​(Double[] thirdOctaveBands)
      Create new array by taking middle third octave bands
      static Integer[] asOctaveBands​(Integer[] thirdOctaveBands)
      Create new array by taking middle third octave bands
      static double dBToW​(double dB)
      Convert Decibel to Watt
      static double[] dBToW​(double[] dB)
      Convert Decibel to Watt
      static double[] multiplicationArray​(double[] array, double coefficient)
      Multiply component of two same size array
      static double[] multiplicationArray​(double[] array1, double[] array2)
      Multiply component of two same size array
      static double sumArray​(double[] energeticSum)
      Sum of all the components of this given list
      static 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 array
      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.
      static double sumDbArray​(double[] array1)
      Sum of all the decibel components of this given list
      static double[] sumDbArray​(double[] array1, double[] array2)
      energetic Sum of two same size dB array
      static double[] twoDgtAftrComma​(double[] valeurs)  
      static double wToDb​(double w)
      Convert Watt to Decibel
      static double[] wToDb​(double[] w)
      Convert Watt to Decibel
    • Constructor Detail

      • AcousticIndicatorsFunctions

        public AcousticIndicatorsFunctions()
    • 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 array
        array2 - double array
        p - 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 input
        coefficient - 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 array
        array2 - 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