code: def testSpectrumSizeSmallerThanNumberOfBands(self):
      # This test creates 6 octave bands centered in
      # 57.26, 163.98, 469.57, 1344.60, 3850.23 and 11024.99 Hz.
      SC = SpectralContrast(sampleRate=44100, frameSize=4)
  
      # The following spectral bins are centered on
      # frequencies 0, 11025 and 22050 Hz.
      spec = [1, 1, 1]
  
      sc = SC(spec)
  
      # First check that the first 5 bands are empty.
      self.assertAlmostEquals(numpy.mean(sc[0][:5]), -2.7182817459)
  
      # Then check that the last bands constains one bin.
      self.assertAlmostEquals(numpy.mean(sc[0][-1]), -1)
  
      # In any case the valley values should be 0.
      self.assertAlmostEquals(numpy.mean(sc[1]), 0)
  
file_path: essentia/test/src/unittests/spectral/test_spectralcontrast.py
imports: from essentia_test import *
label_desc: Use image node_id 9 for calling the TestSpectralContrast obj's underlying member method code with example usage: obj.testSpectrumSizeSmallerThanNumberOfBands() without return types